diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-29 04:59:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:10 -0400 |
commit | d09d7ddf3018b4c6efa76dce72f6dec6054fa22b (patch) | |
tree | 09e28b0602f482b2fadcaecf353ffc02134485cd /drivers | |
parent | 2aae4a108dab8b8bc92270335f6e4b5c146b32ae (diff) |
[PATCH] There is no devfs, there has never been a devfs, we have always been at war with...
Jon Smirl noted a couple of tty driver functions now are quite misleadingly
named with the death of devfs. A quick grep found another case in the lp
driver.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/lp.c | 4 | ||||
-rw-r--r-- | drivers/char/vc_screen.c | 5 | ||||
-rw-r--r-- | drivers/char/vt.c | 10 |
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index f875fda3b089..1ecea7d448f1 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -906,7 +906,7 @@ static int __init lp_init (void) | |||
906 | lp_class = class_create(THIS_MODULE, "printer"); | 906 | lp_class = class_create(THIS_MODULE, "printer"); |
907 | if (IS_ERR(lp_class)) { | 907 | if (IS_ERR(lp_class)) { |
908 | err = PTR_ERR(lp_class); | 908 | err = PTR_ERR(lp_class); |
909 | goto out_devfs; | 909 | goto out_reg; |
910 | } | 910 | } |
911 | 911 | ||
912 | if (parport_register_driver (&lp_driver)) { | 912 | if (parport_register_driver (&lp_driver)) { |
@@ -927,7 +927,7 @@ static int __init lp_init (void) | |||
927 | 927 | ||
928 | out_class: | 928 | out_class: |
929 | class_destroy(lp_class); | 929 | class_destroy(lp_class); |
930 | out_devfs: | 930 | out_reg: |
931 | unregister_chrdev(LP_MAJOR, "lp"); | 931 | unregister_chrdev(LP_MAJOR, "lp"); |
932 | return err; | 932 | return err; |
933 | } | 933 | } |
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index a9247b5213d5..bd7a98c6ea7a 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -474,14 +474,15 @@ static const struct file_operations vcs_fops = { | |||
474 | 474 | ||
475 | static struct class *vc_class; | 475 | static struct class *vc_class; |
476 | 476 | ||
477 | void vcs_make_devfs(struct tty_struct *tty) | 477 | void vcs_make_sysfs(struct tty_struct *tty) |
478 | { | 478 | { |
479 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), | 479 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), |
480 | NULL, "vcs%u", tty->index + 1); | 480 | NULL, "vcs%u", tty->index + 1); |
481 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), | 481 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), |
482 | NULL, "vcsa%u", tty->index + 1); | 482 | NULL, "vcsa%u", tty->index + 1); |
483 | } | 483 | } |
484 | void vcs_remove_devfs(struct tty_struct *tty) | 484 | |
485 | void vcs_remove_sysfs(struct tty_struct *tty) | ||
485 | { | 486 | { |
486 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); | 487 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); |
487 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); | 488 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index da7e66a2a38b..d7d880f8147b 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -128,8 +128,8 @@ const struct consw *conswitchp; | |||
128 | #define DEFAULT_BELL_PITCH 750 | 128 | #define DEFAULT_BELL_PITCH 750 |
129 | #define DEFAULT_BELL_DURATION (HZ/8) | 129 | #define DEFAULT_BELL_DURATION (HZ/8) |
130 | 130 | ||
131 | extern void vcs_make_devfs(struct tty_struct *tty); | 131 | extern void vcs_make_sysfs(struct tty_struct *tty); |
132 | extern void vcs_remove_devfs(struct tty_struct *tty); | 132 | extern void vcs_remove_sysfs(struct tty_struct *tty); |
133 | 133 | ||
134 | extern void console_map_init(void); | 134 | extern void console_map_init(void); |
135 | #ifdef CONFIG_PROM_CONSOLE | 135 | #ifdef CONFIG_PROM_CONSOLE |
@@ -2498,7 +2498,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) | |||
2498 | tty->winsize.ws_col = vc_cons[currcons].d->vc_cols; | 2498 | tty->winsize.ws_col = vc_cons[currcons].d->vc_cols; |
2499 | } | 2499 | } |
2500 | release_console_sem(); | 2500 | release_console_sem(); |
2501 | vcs_make_devfs(tty); | 2501 | vcs_make_sysfs(tty); |
2502 | return ret; | 2502 | return ret; |
2503 | } | 2503 | } |
2504 | } | 2504 | } |
@@ -2511,7 +2511,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) | |||
2511 | * and taking a ref against the tty while we're in the process of forgetting | 2511 | * and taking a ref against the tty while we're in the process of forgetting |
2512 | * about it and cleaning things up. | 2512 | * about it and cleaning things up. |
2513 | * | 2513 | * |
2514 | * This is because vcs_remove_devfs() can sleep and will drop the BKL. | 2514 | * This is because vcs_remove_sysfs() can sleep and will drop the BKL. |
2515 | */ | 2515 | */ |
2516 | static void con_close(struct tty_struct *tty, struct file *filp) | 2516 | static void con_close(struct tty_struct *tty, struct file *filp) |
2517 | { | 2517 | { |
@@ -2524,7 +2524,7 @@ static void con_close(struct tty_struct *tty, struct file *filp) | |||
2524 | vc->vc_tty = NULL; | 2524 | vc->vc_tty = NULL; |
2525 | tty->driver_data = NULL; | 2525 | tty->driver_data = NULL; |
2526 | release_console_sem(); | 2526 | release_console_sem(); |
2527 | vcs_remove_devfs(tty); | 2527 | vcs_remove_sysfs(tty); |
2528 | mutex_unlock(&tty_mutex); | 2528 | mutex_unlock(&tty_mutex); |
2529 | /* | 2529 | /* |
2530 | * tty_mutex is released, but we still hold BKL, so there is | 2530 | * tty_mutex is released, but we still hold BKL, so there is |