aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 12:53:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:08 -0400
commitca8eca6884861c1ce294b05aacfdf9045bba9aff (patch)
treed155207bb52a56683160aa192765a19d67161c01 /drivers/char/lp.c
parentdeb3697037a7d362d13468a73643e09cbc1615a8 (diff)
[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r--drivers/char/lp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 4dee945031d4..59eebe5a035f 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -146,7 +146,7 @@
146static struct lp_struct lp_table[LP_NO]; 146static struct lp_struct lp_table[LP_NO];
147 147
148static unsigned int lp_count = 0; 148static unsigned int lp_count = 0;
149static struct class_simple *lp_class; 149static struct class *lp_class;
150 150
151#ifdef CONFIG_LP_CONSOLE 151#ifdef CONFIG_LP_CONSOLE
152static struct parport *console_registered; // initially NULL 152static struct parport *console_registered; // initially NULL
@@ -804,7 +804,7 @@ static int lp_register(int nr, struct parport *port)
804 if (reset) 804 if (reset)
805 lp_reset(nr); 805 lp_reset(nr);
806 806
807 class_simple_device_add(lp_class, MKDEV(LP_MAJOR, nr), NULL, 807 class_device_create(lp_class, MKDEV(LP_MAJOR, nr), NULL,
808 "lp%d", nr); 808 "lp%d", nr);
809 devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, 809 devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO,
810 "printers/%d", nr); 810 "printers/%d", nr);
@@ -907,7 +907,7 @@ static int __init lp_init (void)
907 } 907 }
908 908
909 devfs_mk_dir("printers"); 909 devfs_mk_dir("printers");
910 lp_class = class_simple_create(THIS_MODULE, "printer"); 910 lp_class = class_create(THIS_MODULE, "printer");
911 if (IS_ERR(lp_class)) { 911 if (IS_ERR(lp_class)) {
912 err = PTR_ERR(lp_class); 912 err = PTR_ERR(lp_class);
913 goto out_devfs; 913 goto out_devfs;
@@ -930,7 +930,7 @@ static int __init lp_init (void)
930 return 0; 930 return 0;
931 931
932out_class: 932out_class:
933 class_simple_destroy(lp_class); 933 class_destroy(lp_class);
934out_devfs: 934out_devfs:
935 devfs_remove("printers"); 935 devfs_remove("printers");
936 unregister_chrdev(LP_MAJOR, "lp"); 936 unregister_chrdev(LP_MAJOR, "lp");
@@ -981,10 +981,10 @@ static void lp_cleanup_module (void)
981 continue; 981 continue;
982 parport_unregister_device(lp_table[offset].dev); 982 parport_unregister_device(lp_table[offset].dev);
983 devfs_remove("printers/%d", offset); 983 devfs_remove("printers/%d", offset);
984 class_simple_device_remove(MKDEV(LP_MAJOR, offset)); 984 class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
985 } 985 }
986 devfs_remove("printers"); 986 devfs_remove("printers");
987 class_simple_destroy(lp_class); 987 class_destroy(lp_class);
988} 988}
989 989
990__setup("lp=", lp_setup); 990__setup("lp=", lp_setup);