diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e5953f3433f3..c586bfa852ee 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -809,7 +809,7 @@ static void do_tty_hangup(void *data) | |||
809 | check_tty_count(tty, "do_tty_hangup"); | 809 | check_tty_count(tty, "do_tty_hangup"); |
810 | file_list_lock(); | 810 | file_list_lock(); |
811 | /* This breaks for file handles being sent over AF_UNIX sockets ? */ | 811 | /* This breaks for file handles being sent over AF_UNIX sockets ? */ |
812 | list_for_each_entry(filp, &tty->tty_files, f_list) { | 812 | list_for_each_entry(filp, &tty->tty_files, f_u.fu_list) { |
813 | if (filp->f_op->write == redirected_tty_write) | 813 | if (filp->f_op->write == redirected_tty_write) |
814 | cons_filp = filp; | 814 | cons_filp = filp; |
815 | if (filp->f_op->write != tty_write) | 815 | if (filp->f_op->write != tty_write) |
@@ -2728,7 +2728,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index, | |||
2728 | pty_line_name(driver, index, name); | 2728 | pty_line_name(driver, index, name); |
2729 | else | 2729 | else |
2730 | tty_line_name(driver, index, name); | 2730 | tty_line_name(driver, index, name); |
2731 | class_device_create(tty_class, dev, device, name); | 2731 | class_device_create(tty_class, NULL, dev, device, "%s", name); |
2732 | } | 2732 | } |
2733 | 2733 | ||
2734 | /** | 2734 | /** |
@@ -2983,14 +2983,14 @@ static int __init tty_init(void) | |||
2983 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) | 2983 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) |
2984 | panic("Couldn't register /dev/tty driver\n"); | 2984 | panic("Couldn't register /dev/tty driver\n"); |
2985 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); | 2985 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); |
2986 | class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); | 2986 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); |
2987 | 2987 | ||
2988 | cdev_init(&console_cdev, &console_fops); | 2988 | cdev_init(&console_cdev, &console_fops); |
2989 | if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || | 2989 | if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || |
2990 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) | 2990 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) |
2991 | panic("Couldn't register /dev/console driver\n"); | 2991 | panic("Couldn't register /dev/console driver\n"); |
2992 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); | 2992 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); |
2993 | class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); | 2993 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); |
2994 | 2994 | ||
2995 | #ifdef CONFIG_UNIX98_PTYS | 2995 | #ifdef CONFIG_UNIX98_PTYS |
2996 | cdev_init(&ptmx_cdev, &ptmx_fops); | 2996 | cdev_init(&ptmx_cdev, &ptmx_fops); |
@@ -2998,7 +2998,7 @@ static int __init tty_init(void) | |||
2998 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) | 2998 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) |
2999 | panic("Couldn't register /dev/ptmx driver\n"); | 2999 | panic("Couldn't register /dev/ptmx driver\n"); |
3000 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); | 3000 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); |
3001 | class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); | 3001 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); |
3002 | #endif | 3002 | #endif |
3003 | 3003 | ||
3004 | #ifdef CONFIG_VT | 3004 | #ifdef CONFIG_VT |
@@ -3007,7 +3007,7 @@ static int __init tty_init(void) | |||
3007 | register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) | 3007 | register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) |
3008 | panic("Couldn't register /dev/tty0 driver\n"); | 3008 | panic("Couldn't register /dev/tty0 driver\n"); |
3009 | devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); | 3009 | devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); |
3010 | class_device_create(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); | 3010 | class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); |
3011 | 3011 | ||
3012 | vty_init(); | 3012 | vty_init(); |
3013 | #endif | 3013 | #endif |