diff options
Diffstat (limited to 'drivers/char/ppdev.c')
| -rw-r--r-- | drivers/char/ppdev.c | 15 | 
1 files changed, 1 insertions, 14 deletions
| diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index bee6c47b45bd..24231d9743dc 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
| @@ -60,7 +60,6 @@ | |||
| 60 | #include <linux/init.h> | 60 | #include <linux/init.h> | 
| 61 | #include <linux/sched.h> | 61 | #include <linux/sched.h> | 
| 62 | #include <linux/device.h> | 62 | #include <linux/device.h> | 
| 63 | #include <linux/devfs_fs_kernel.h> | ||
| 64 | #include <linux/ioctl.h> | 63 | #include <linux/ioctl.h> | 
| 65 | #include <linux/parport.h> | 64 | #include <linux/parport.h> | 
| 66 | #include <linux/ctype.h> | 65 | #include <linux/ctype.h> | 
| @@ -770,7 +769,7 @@ static struct parport_driver pp_driver = { | |||
| 770 | 769 | ||
| 771 | static int __init ppdev_init (void) | 770 | static int __init ppdev_init (void) | 
| 772 | { | 771 | { | 
| 773 | int i, err = 0; | 772 | int err = 0; | 
| 774 | 773 | ||
| 775 | if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { | 774 | if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { | 
| 776 | printk (KERN_WARNING CHRDEV ": unable to get major %d\n", | 775 | printk (KERN_WARNING CHRDEV ": unable to get major %d\n", | 
| @@ -782,11 +781,6 @@ static int __init ppdev_init (void) | |||
| 782 | err = PTR_ERR(ppdev_class); | 781 | err = PTR_ERR(ppdev_class); | 
| 783 | goto out_chrdev; | 782 | goto out_chrdev; | 
| 784 | } | 783 | } | 
| 785 | devfs_mk_dir("parports"); | ||
| 786 | for (i = 0; i < PARPORT_MAX; i++) { | ||
| 787 | devfs_mk_cdev(MKDEV(PP_MAJOR, i), | ||
| 788 | S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i); | ||
| 789 | } | ||
| 790 | if (parport_register_driver(&pp_driver)) { | 784 | if (parport_register_driver(&pp_driver)) { | 
| 791 | printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); | 785 | printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); | 
| 792 | goto out_class; | 786 | goto out_class; | 
| @@ -796,9 +790,6 @@ static int __init ppdev_init (void) | |||
| 796 | goto out; | 790 | goto out; | 
| 797 | 791 | ||
| 798 | out_class: | 792 | out_class: | 
| 799 | for (i = 0; i < PARPORT_MAX; i++) | ||
| 800 | devfs_remove("parports/%d", i); | ||
| 801 | devfs_remove("parports"); | ||
| 802 | class_destroy(ppdev_class); | 793 | class_destroy(ppdev_class); | 
| 803 | out_chrdev: | 794 | out_chrdev: | 
| 804 | unregister_chrdev(PP_MAJOR, CHRDEV); | 795 | unregister_chrdev(PP_MAJOR, CHRDEV); | 
| @@ -808,12 +799,8 @@ out: | |||
| 808 | 799 | ||
| 809 | static void __exit ppdev_cleanup (void) | 800 | static void __exit ppdev_cleanup (void) | 
| 810 | { | 801 | { | 
| 811 | int i; | ||
| 812 | /* Clean up all parport stuff */ | 802 | /* Clean up all parport stuff */ | 
| 813 | for (i = 0; i < PARPORT_MAX; i++) | ||
| 814 | devfs_remove("parports/%d", i); | ||
| 815 | parport_unregister_driver(&pp_driver); | 803 | parport_unregister_driver(&pp_driver); | 
| 816 | devfs_remove("parports"); | ||
| 817 | class_destroy(ppdev_class); | 804 | class_destroy(ppdev_class); | 
| 818 | unregister_chrdev (PP_MAJOR, CHRDEV); | 805 | unregister_chrdev (PP_MAJOR, CHRDEV); | 
| 819 | } | 806 | } | 
