Commit d09d7ddf authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[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: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2aae4a10
...@@ -906,7 +906,7 @@ static int __init lp_init (void) ...@@ -906,7 +906,7 @@ static int __init lp_init (void)
lp_class = class_create(THIS_MODULE, "printer"); lp_class = class_create(THIS_MODULE, "printer");
if (IS_ERR(lp_class)) { if (IS_ERR(lp_class)) {
err = PTR_ERR(lp_class); err = PTR_ERR(lp_class);
goto out_devfs; goto out_reg;
} }
if (parport_register_driver (&lp_driver)) { if (parport_register_driver (&lp_driver)) {
...@@ -927,7 +927,7 @@ static int __init lp_init (void) ...@@ -927,7 +927,7 @@ static int __init lp_init (void)
out_class: out_class:
class_destroy(lp_class); class_destroy(lp_class);
out_devfs: out_reg:
unregister_chrdev(LP_MAJOR, "lp"); unregister_chrdev(LP_MAJOR, "lp");
return err; return err;
} }
......
...@@ -474,14 +474,15 @@ static const struct file_operations vcs_fops = { ...@@ -474,14 +474,15 @@ static const struct file_operations vcs_fops = {
static struct class *vc_class; static struct class *vc_class;
void vcs_make_devfs(struct tty_struct *tty) void vcs_make_sysfs(struct tty_struct *tty)
{ {
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
NULL, "vcs%u", tty->index + 1); NULL, "vcs%u", tty->index + 1);
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
NULL, "vcsa%u", tty->index + 1); NULL, "vcsa%u", tty->index + 1);
} }
void vcs_remove_devfs(struct tty_struct *tty)
void vcs_remove_sysfs(struct tty_struct *tty)
{ {
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
......
...@@ -128,8 +128,8 @@ const struct consw *conswitchp; ...@@ -128,8 +128,8 @@ const struct consw *conswitchp;
#define DEFAULT_BELL_PITCH 750 #define DEFAULT_BELL_PITCH 750
#define DEFAULT_BELL_DURATION (HZ/8) #define DEFAULT_BELL_DURATION (HZ/8)
extern void vcs_make_devfs(struct tty_struct *tty); extern void vcs_make_sysfs(struct tty_struct *tty);
extern void vcs_remove_devfs(struct tty_struct *tty); extern void vcs_remove_sysfs(struct tty_struct *tty);
extern void console_map_init(void); extern void console_map_init(void);
#ifdef CONFIG_PROM_CONSOLE #ifdef CONFIG_PROM_CONSOLE
...@@ -2498,7 +2498,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) ...@@ -2498,7 +2498,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
tty->winsize.ws_col = vc_cons[currcons].d->vc_cols; tty->winsize.ws_col = vc_cons[currcons].d->vc_cols;
} }
release_console_sem(); release_console_sem();
vcs_make_devfs(tty); vcs_make_sysfs(tty);
return ret; return ret;
} }
} }
...@@ -2511,7 +2511,7 @@ static int con_open(struct tty_struct *tty, struct file *filp) ...@@ -2511,7 +2511,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
* and taking a ref against the tty while we're in the process of forgetting * and taking a ref against the tty while we're in the process of forgetting
* about it and cleaning things up. * about it and cleaning things up.
* *
* This is because vcs_remove_devfs() can sleep and will drop the BKL. * This is because vcs_remove_sysfs() can sleep and will drop the BKL.
*/ */
static void con_close(struct tty_struct *tty, struct file *filp) static void con_close(struct tty_struct *tty, struct file *filp)
{ {
...@@ -2524,7 +2524,7 @@ static void con_close(struct tty_struct *tty, struct file *filp) ...@@ -2524,7 +2524,7 @@ static void con_close(struct tty_struct *tty, struct file *filp)
vc->vc_tty = NULL; vc->vc_tty = NULL;
tty->driver_data = NULL; tty->driver_data = NULL;
release_console_sem(); release_console_sem();
vcs_remove_devfs(tty); vcs_remove_sysfs(tty);
mutex_unlock(&tty_mutex); mutex_unlock(&tty_mutex);
/* /*
* tty_mutex is released, but we still hold BKL, so there is * tty_mutex is released, but we still hold BKL, so there is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment