[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [mini-os master] Eliminate fbfront union member in struct file
commit 395a27e142acf139bc1a3017abe97aa5635ba904 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Tue Jan 11 15:58:07 2022 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Jan 12 11:35:38 2022 +0000 Eliminate fbfront union member in struct file Replace the fbfront specific union member in struct file with the common dev pointer. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- fbfront.c | 2 +- include/lib.h | 3 --- lib/sys.c | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fbfront.c b/fbfront.c index 6725da1..c8410af 100644 --- a/fbfront.c +++ b/fbfront.c @@ -703,7 +703,7 @@ int fbfront_open(struct fbfront_dev *dev) { dev->fd = alloc_fd(FTYPE_FB); printk("fb_open(%s) -> %d\n", dev->nodename, dev->fd); - files[dev->fd].fb.dev = dev; + files[dev->fd].dev = dev; return dev->fd; } #endif diff --git a/include/lib.h b/include/lib.h index 0cedae6..2a9a01c 100644 --- a/include/lib.h +++ b/include/lib.h @@ -199,9 +199,6 @@ struct file { struct { struct kbdfront_dev *dev; } kbd; - struct { - struct fbfront_dev *dev; - } fb; #ifdef CONFIG_TPMFRONT struct { struct tpmfront_dev *dev; diff --git a/lib/sys.c b/lib/sys.c index 62c2020..2d48657 100644 --- a/lib/sys.c +++ b/lib/sys.c @@ -287,7 +287,7 @@ int read(int fd, void *buf, size_t nbytes) case FTYPE_FB: { int ret, n; n = nbytes / sizeof(union xenfb_in_event); - ret = fbfront_receive(files[fd].fb.dev, buf, n); + ret = fbfront_receive(files[fd].dev, buf, n); if (ret <= 0) { errno = EAGAIN; return -1; @@ -480,7 +480,7 @@ int close(int fd) #endif #ifdef CONFIG_FBFRONT case FTYPE_FB: - shutdown_fbfront(files[fd].fb.dev); + shutdown_fbfront(files[fd].dev); files[fd].type = FTYPE_NONE; return 0; #endif -- generated by git-patchbot for /home/xen/git/mini-os.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |