diff options
Diffstat (limited to 'drivers/block/paride/pt.c')
-rw-r--r-- | drivers/block/paride/pt.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index d2013d362403..35fb26636721 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -141,7 +141,6 @@ static int (*drives[4])[6] = {&drive0, &drive1, &drive2, &drive3}; | |||
141 | #include <linux/module.h> | 141 | #include <linux/module.h> |
142 | #include <linux/init.h> | 142 | #include <linux/init.h> |
143 | #include <linux/fs.h> | 143 | #include <linux/fs.h> |
144 | #include <linux/devfs_fs_kernel.h> | ||
145 | #include <linux/delay.h> | 144 | #include <linux/delay.h> |
146 | #include <linux/slab.h> | 145 | #include <linux/slab.h> |
147 | #include <linux/mtio.h> | 146 | #include <linux/mtio.h> |
@@ -971,32 +970,15 @@ static int __init pt_init(void) | |||
971 | goto out_chrdev; | 970 | goto out_chrdev; |
972 | } | 971 | } |
973 | 972 | ||
974 | devfs_mk_dir("pt"); | ||
975 | for (unit = 0; unit < PT_UNITS; unit++) | 973 | for (unit = 0; unit < PT_UNITS; unit++) |
976 | if (pt[unit].present) { | 974 | if (pt[unit].present) { |
977 | class_device_create(pt_class, NULL, MKDEV(major, unit), | 975 | class_device_create(pt_class, NULL, MKDEV(major, unit), |
978 | NULL, "pt%d", unit); | 976 | NULL, "pt%d", unit); |
979 | err = devfs_mk_cdev(MKDEV(major, unit), | ||
980 | S_IFCHR | S_IRUSR | S_IWUSR, | ||
981 | "pt/%d", unit); | ||
982 | if (err) { | ||
983 | class_device_destroy(pt_class, MKDEV(major, unit)); | ||
984 | goto out_class; | ||
985 | } | ||
986 | class_device_create(pt_class, NULL, MKDEV(major, unit + 128), | 977 | class_device_create(pt_class, NULL, MKDEV(major, unit + 128), |
987 | NULL, "pt%dn", unit); | 978 | NULL, "pt%dn", unit); |
988 | err = devfs_mk_cdev(MKDEV(major, unit + 128), | ||
989 | S_IFCHR | S_IRUSR | S_IWUSR, | ||
990 | "pt/%dn", unit); | ||
991 | if (err) { | ||
992 | class_device_destroy(pt_class, MKDEV(major, unit + 128)); | ||
993 | goto out_class; | ||
994 | } | ||
995 | } | 979 | } |
996 | goto out; | 980 | goto out; |
997 | 981 | ||
998 | out_class: | ||
999 | class_destroy(pt_class); | ||
1000 | out_chrdev: | 982 | out_chrdev: |
1001 | unregister_chrdev(major, "pt"); | 983 | unregister_chrdev(major, "pt"); |
1002 | out: | 984 | out: |
@@ -1009,12 +991,9 @@ static void __exit pt_exit(void) | |||
1009 | for (unit = 0; unit < PT_UNITS; unit++) | 991 | for (unit = 0; unit < PT_UNITS; unit++) |
1010 | if (pt[unit].present) { | 992 | if (pt[unit].present) { |
1011 | class_device_destroy(pt_class, MKDEV(major, unit)); | 993 | class_device_destroy(pt_class, MKDEV(major, unit)); |
1012 | devfs_remove("pt/%d", unit); | ||
1013 | class_device_destroy(pt_class, MKDEV(major, unit + 128)); | 994 | class_device_destroy(pt_class, MKDEV(major, unit + 128)); |
1014 | devfs_remove("pt/%dn", unit); | ||
1015 | } | 995 | } |
1016 | class_destroy(pt_class); | 996 | class_destroy(pt_class); |
1017 | devfs_remove("pt"); | ||
1018 | unregister_chrdev(major, name); | 997 | unregister_chrdev(major, name); |
1019 | for (unit = 0; unit < PT_UNITS; unit++) | 998 | for (unit = 0; unit < PT_UNITS; unit++) |
1020 | if (pt[unit].present) | 999 | if (pt[unit].present) |