aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-15 17:23:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:04 -0400
commit7fe845d11ad1b4aac098d40c55275569e143c483 (patch)
treedb94f76a6de7ec45fbdea8dfdb65316a7452b3b5 /drivers
parente9ba6365fd4f0d9e7d022c883bd044fbaa48257f (diff)
[PATCH] tty: move to use the new class code, instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 26e5e19ed854..31831030f73f 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2654,7 +2654,7 @@ static void tty_default_put_char(struct tty_struct *tty, unsigned char ch)
2654 tty->driver->write(tty, &ch, 1); 2654 tty->driver->write(tty, &ch, 1);
2655} 2655}
2656 2656
2657static struct class_simple *tty_class; 2657static struct class *tty_class;
2658 2658
2659/** 2659/**
2660 * tty_register_device - register a tty device 2660 * tty_register_device - register a tty device
@@ -2687,7 +2687,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index,
2687 pty_line_name(driver, index, name); 2687 pty_line_name(driver, index, name);
2688 else 2688 else
2689 tty_line_name(driver, index, name); 2689 tty_line_name(driver, index, name);
2690 class_simple_device_add(tty_class, dev, device, name); 2690 class_device_create(tty_class, dev, device, name);
2691} 2691}
2692 2692
2693/** 2693/**
@@ -2701,7 +2701,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index,
2701void tty_unregister_device(struct tty_driver *driver, unsigned index) 2701void tty_unregister_device(struct tty_driver *driver, unsigned index)
2702{ 2702{
2703 devfs_remove("%s%d", driver->devfs_name, index + driver->name_base); 2703 devfs_remove("%s%d", driver->devfs_name, index + driver->name_base);
2704 class_simple_device_remove(MKDEV(driver->major, driver->minor_start) + index); 2704 class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index);
2705} 2705}
2706 2706
2707EXPORT_SYMBOL(tty_register_device); 2707EXPORT_SYMBOL(tty_register_device);
@@ -2918,7 +2918,7 @@ extern int vty_init(void);
2918 2918
2919static int __init tty_class_init(void) 2919static int __init tty_class_init(void)
2920{ 2920{
2921 tty_class = class_simple_create(THIS_MODULE, "tty"); 2921 tty_class = class_create(THIS_MODULE, "tty");
2922 if (IS_ERR(tty_class)) 2922 if (IS_ERR(tty_class))
2923 return PTR_ERR(tty_class); 2923 return PTR_ERR(tty_class);
2924 return 0; 2924 return 0;
@@ -2947,14 +2947,14 @@ static int __init tty_init(void)
2947 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 2947 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
2948 panic("Couldn't register /dev/tty driver\n"); 2948 panic("Couldn't register /dev/tty driver\n");
2949 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); 2949 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
2950 class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 2950 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
2951 2951
2952 cdev_init(&console_cdev, &console_fops); 2952 cdev_init(&console_cdev, &console_fops);
2953 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 2953 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
2954 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 2954 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
2955 panic("Couldn't register /dev/console driver\n"); 2955 panic("Couldn't register /dev/console driver\n");
2956 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); 2956 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console");
2957 class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 2957 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
2958 2958
2959#ifdef CONFIG_UNIX98_PTYS 2959#ifdef CONFIG_UNIX98_PTYS
2960 cdev_init(&ptmx_cdev, &ptmx_fops); 2960 cdev_init(&ptmx_cdev, &ptmx_fops);
@@ -2962,7 +2962,7 @@ static int __init tty_init(void)
2962 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 2962 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
2963 panic("Couldn't register /dev/ptmx driver\n"); 2963 panic("Couldn't register /dev/ptmx driver\n");
2964 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); 2964 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx");
2965 class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 2965 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
2966#endif 2966#endif
2967 2967
2968#ifdef CONFIG_VT 2968#ifdef CONFIG_VT
@@ -2971,7 +2971,7 @@ static int __init tty_init(void)
2971 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 2971 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
2972 panic("Couldn't register /dev/tty0 driver\n"); 2972 panic("Couldn't register /dev/tty0 driver\n");
2973 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); 2973 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0");
2974 class_simple_device_add(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 2974 class_device_create(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
2975 2975
2976 vty_init(); 2976 vty_init();
2977#endif 2977#endif