Skip to content

Commit d09d7dd

Browse files
Alan-CoxLinus Torvalds
authored andcommitted
[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>
1 parent 2aae4a1 commit d09d7dd

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

‎drivers/char/lp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ static int __init lp_init (void)
906906
lp_class = class_create(THIS_MODULE, "printer");
907907
if (IS_ERR(lp_class)) {
908908
err = PTR_ERR(lp_class);
909-
goto out_devfs;
909+
goto out_reg;
910910
}
911911

912912
if (parport_register_driver (&lp_driver)) {
@@ -927,7 +927,7 @@ static int __init lp_init (void)
927927

928928
out_class:
929929
class_destroy(lp_class);
930-
out_devfs:
930+
out_reg:
931931
unregister_chrdev(LP_MAJOR, "lp");
932932
return err;
933933
}

‎drivers/char/vc_screen.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,15 @@ static const struct file_operations vcs_fops = {
474474

475475
static struct class *vc_class;
476476

477-
void vcs_make_devfs(struct tty_struct *tty)
477+
void vcs_make_sysfs(struct tty_struct *tty)
478478
{
479479
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
480480
NULL, "vcs%u", tty->index + 1);
481481
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
482482
NULL, "vcsa%u", tty->index + 1);
483483
}
484-
void vcs_remove_devfs(struct tty_struct *tty)
484+
485+
void vcs_remove_sysfs(struct tty_struct *tty)
485486
{
486487
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
487488
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));

‎drivers/char/vt.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ const struct consw *conswitchp;
128128
#define DEFAULT_BELL_PITCH 750
129129
#define DEFAULT_BELL_DURATION (HZ/8)
130130

131-
extern void vcs_make_devfs(struct tty_struct *tty);
132-
extern void vcs_remove_devfs(struct tty_struct *tty);
131+
extern void vcs_make_sysfs(struct tty_struct *tty);
132+
extern void vcs_remove_sysfs(struct tty_struct *tty);
133133

134134
extern void console_map_init(void);
135135
#ifdef CONFIG_PROM_CONSOLE
@@ -2498,7 +2498,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
24982498
tty->winsize.ws_col = vc_cons[currcons].d->vc_cols;
24992499
}
25002500
release_console_sem();
2501-
vcs_make_devfs(tty);
2501+
vcs_make_sysfs(tty);
25022502
return ret;
25032503
}
25042504
}
@@ -2511,7 +2511,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
25112511
* and taking a ref against the tty while we're in the process of forgetting
25122512
* about it and cleaning things up.
25132513
*
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.
25152515
*/
25162516
static void con_close(struct tty_struct *tty, struct file *filp)
25172517
{
@@ -2524,7 +2524,7 @@ static void con_close(struct tty_struct *tty, struct file *filp)
25242524
vc->vc_tty = NULL;
25252525
tty->driver_data = NULL;
25262526
release_console_sem();
2527-
vcs_remove_devfs(tty);
2527+
vcs_remove_sysfs(tty);
25282528
mutex_unlock(&tty_mutex);
25292529
/*
25302530
* tty_mutex is released, but we still hold BKL, so there is

0 commit comments

Comments
 (0)