diff options
| author | Alexander Viro <viro@math.psu.edu> | 2002-12-03 20:35:49 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-12-03 20:35:49 -0800 |
| commit | e2cd7a4380bf2408adbb875eac17147148aadf8a (patch) | |
| tree | 690db571272e8f70cd1b178b73cc16183901a1fc | |
| parent | 10a155f24ff982782c9599e3865fe2dbeee9f0b1 (diff) | |
[PATCH] fb cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t fields
(actually, one of them became gratitious and another was completely
unused to start with).
| -rw-r--r-- | drivers/video/fbmem.c | 21 | ||||
| -rw-r--r-- | include/linux/fb.h | 2 |
2 files changed, 7 insertions, 16 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index ee4c1d188385..9115118e9d77 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -718,9 +718,6 @@ static struct file_operations fb_fops = { #endif }; -static devfs_handle_t devfs_handle; - - /** * register_framebuffer - registers a frame buffer device * @fb_info: frame buffer info structure @@ -735,7 +732,7 @@ int register_framebuffer(struct fb_info *fb_info) { int i, j; - char name_buf[8]; + char name_buf[12]; static int fb_ever_opened[FB_MAX]; static int first = 1; @@ -771,11 +768,10 @@ register_framebuffer(struct fb_info *fb_info) first = 0; take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default); } - sprintf (name_buf, "%d", i); - fb_info->devfs_handle = - devfs_register (devfs_handle, name_buf, DEVFS_FL_DEFAULT, - FB_MAJOR, i, S_IFCHR | S_IRUGO | S_IWUGO, - &fb_fops, NULL); + sprintf (name_buf, "fb/%d", i); + devfs_register(NULL, name_buf, DEVFS_FL_DEFAULT, + FB_MAJOR, i, S_IFCHR | S_IRUGO | S_IWUGO, + &fb_fops, NULL); return 0; } @@ -802,10 +798,7 @@ unregister_framebuffer(struct fb_info *fb_info) return -EBUSY; if (!registered_fb[i]) return -EINVAL; - devfs_unregister (fb_info->devfs_handle); - fb_info->devfs_handle = NULL; - devfs_unregister (fb_info->devfs_lhandle); - fb_info->devfs_lhandle = NULL; + devfs_remove("fb/%d", i); registered_fb[i]=NULL; num_registered_fb--; return 0; @@ -828,7 +821,7 @@ fbmem_init(void) create_proc_read_entry("fb", 0, 0, fbmem_read_proc, NULL); - devfs_handle = devfs_mk_dir (NULL, "fb", NULL); + devfs_mk_dir (NULL, "fb", NULL); if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) printk("unable to get major %d for fb devs\n", FB_MAJOR); diff --git a/include/linux/fb.h b/include/linux/fb.h index d1782a6bd008..cda1c818f68c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -369,8 +369,6 @@ struct fb_info { struct vc_data *display_fg; /* Console visible on this display */ int currcon; /* Current VC. */ char fontname[40]; /* default font name */ - devfs_handle_t devfs_handle; /* Devfs handle for new name */ - devfs_handle_t devfs_lhandle; /* Devfs handle for compat. symlink */ int (*changevar)(int); /* tell console var has changed */ int (*switch_con)(int, struct fb_info*); /* tell fb to switch consoles */ |
