X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fchar%2Flp.c;h=f875fda3b089d54332341671388716c99ebd05eb;hb=363e065c02b1273364d5356711a83e7f548fc0c8;hp=2afb9038dbc5752abbdf55dc1dc3c8a9737bd841;hpb=2b8dfec8c8fa4ba5bc946a602e94e99861462cad;p=powerpc.git diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 2afb9038db..f875fda3b0 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -114,13 +114,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -668,7 +666,7 @@ static int lp_ioctl(struct inode *inode, struct file *file, return retval; } -static struct file_operations lp_fops = { +static const struct file_operations lp_fops = { .owner = THIS_MODULE, .write = lp_write, .ioctl = lp_ioctl, @@ -805,10 +803,8 @@ static int lp_register(int nr, struct parport *port) if (reset) lp_reset(nr); - class_device_create(lp_class, MKDEV(LP_MAJOR, nr), NULL, + class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, "lp%d", nr); - devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, - "printers/%d", nr); printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); @@ -907,7 +903,6 @@ static int __init lp_init (void) return -EIO; } - devfs_mk_dir("printers"); lp_class = class_create(THIS_MODULE, "printer"); if (IS_ERR(lp_class)) { err = PTR_ERR(lp_class); @@ -933,7 +928,6 @@ static int __init lp_init (void) out_class: class_destroy(lp_class); out_devfs: - devfs_remove("printers"); unregister_chrdev(LP_MAJOR, "lp"); return err; } @@ -981,10 +975,8 @@ static void lp_cleanup_module (void) if (lp_table[offset].dev == NULL) continue; parport_unregister_device(lp_table[offset].dev); - devfs_remove("printers/%d", offset); class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); } - devfs_remove("printers"); class_destroy(lp_class); }