diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 62051f8b0910..c59e2a0996cc 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -799,8 +799,7 @@ static int lp_register(int nr, struct parport *port) | |||
799 | if (reset) | 799 | if (reset) |
800 | lp_reset(nr); | 800 | lp_reset(nr); |
801 | 801 | ||
802 | class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev, | 802 | device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr); |
803 | "lp%d", nr); | ||
804 | 803 | ||
805 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, | 804 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, |
806 | (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); | 805 | (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); |
@@ -971,7 +970,7 @@ static void lp_cleanup_module (void) | |||
971 | if (lp_table[offset].dev == NULL) | 970 | if (lp_table[offset].dev == NULL) |
972 | continue; | 971 | continue; |
973 | parport_unregister_device(lp_table[offset].dev); | 972 | parport_unregister_device(lp_table[offset].dev); |
974 | class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); | 973 | device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); |
975 | } | 974 | } |
976 | class_destroy(lp_class); | 975 | class_destroy(lp_class); |
977 | } | 976 | } |