diff options
Diffstat (limited to 'drivers/block/paride/pt.c')
-rw-r--r-- | drivers/block/paride/pt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 8fbd6922fe0d..5fe8ee86f095 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -242,7 +242,7 @@ static struct file_operations pt_fops = { | |||
242 | }; | 242 | }; |
243 | 243 | ||
244 | /* sysfs class support */ | 244 | /* sysfs class support */ |
245 | static struct class_simple *pt_class; | 245 | static struct class *pt_class; |
246 | 246 | ||
247 | static inline int status_reg(struct pi_adapter *pi) | 247 | static inline int status_reg(struct pi_adapter *pi) |
248 | { | 248 | { |
@@ -963,7 +963,7 @@ static int __init pt_init(void) | |||
963 | err = -1; | 963 | err = -1; |
964 | goto out; | 964 | goto out; |
965 | } | 965 | } |
966 | pt_class = class_simple_create(THIS_MODULE, "pt"); | 966 | pt_class = class_create(THIS_MODULE, "pt"); |
967 | if (IS_ERR(pt_class)) { | 967 | if (IS_ERR(pt_class)) { |
968 | err = PTR_ERR(pt_class); | 968 | err = PTR_ERR(pt_class); |
969 | goto out_chrdev; | 969 | goto out_chrdev; |
@@ -972,29 +972,29 @@ static int __init pt_init(void) | |||
972 | devfs_mk_dir("pt"); | 972 | devfs_mk_dir("pt"); |
973 | for (unit = 0; unit < PT_UNITS; unit++) | 973 | for (unit = 0; unit < PT_UNITS; unit++) |
974 | if (pt[unit].present) { | 974 | if (pt[unit].present) { |
975 | class_simple_device_add(pt_class, MKDEV(major, unit), | 975 | class_device_create(pt_class, MKDEV(major, unit), |
976 | NULL, "pt%d", unit); | 976 | NULL, "pt%d", unit); |
977 | err = devfs_mk_cdev(MKDEV(major, unit), | 977 | err = devfs_mk_cdev(MKDEV(major, unit), |
978 | S_IFCHR | S_IRUSR | S_IWUSR, | 978 | S_IFCHR | S_IRUSR | S_IWUSR, |
979 | "pt/%d", unit); | 979 | "pt/%d", unit); |
980 | if (err) { | 980 | if (err) { |
981 | class_simple_device_remove(MKDEV(major, unit)); | 981 | class_device_destroy(pt_class, MKDEV(major, unit)); |
982 | goto out_class; | 982 | goto out_class; |
983 | } | 983 | } |
984 | class_simple_device_add(pt_class, MKDEV(major, unit + 128), | 984 | class_device_create(pt_class, MKDEV(major, unit + 128), |
985 | NULL, "pt%dn", unit); | 985 | NULL, "pt%dn", unit); |
986 | err = devfs_mk_cdev(MKDEV(major, unit + 128), | 986 | err = devfs_mk_cdev(MKDEV(major, unit + 128), |
987 | S_IFCHR | S_IRUSR | S_IWUSR, | 987 | S_IFCHR | S_IRUSR | S_IWUSR, |
988 | "pt/%dn", unit); | 988 | "pt/%dn", unit); |
989 | if (err) { | 989 | if (err) { |
990 | class_simple_device_remove(MKDEV(major, unit + 128)); | 990 | class_device_destroy(pt_class, MKDEV(major, unit + 128)); |
991 | goto out_class; | 991 | goto out_class; |
992 | } | 992 | } |
993 | } | 993 | } |
994 | goto out; | 994 | goto out; |
995 | 995 | ||
996 | out_class: | 996 | out_class: |
997 | class_simple_destroy(pt_class); | 997 | class_destroy(pt_class); |
998 | out_chrdev: | 998 | out_chrdev: |
999 | unregister_chrdev(major, "pt"); | 999 | unregister_chrdev(major, "pt"); |
1000 | out: | 1000 | out: |
@@ -1006,12 +1006,12 @@ static void __exit pt_exit(void) | |||
1006 | int unit; | 1006 | int unit; |
1007 | for (unit = 0; unit < PT_UNITS; unit++) | 1007 | for (unit = 0; unit < PT_UNITS; unit++) |
1008 | if (pt[unit].present) { | 1008 | if (pt[unit].present) { |
1009 | class_simple_device_remove(MKDEV(major, unit)); | 1009 | class_device_destroy(pt_class, MKDEV(major, unit)); |
1010 | devfs_remove("pt/%d", unit); | 1010 | devfs_remove("pt/%d", unit); |
1011 | class_simple_device_remove(MKDEV(major, unit + 128)); | 1011 | class_device_destroy(pt_class, MKDEV(major, unit + 128)); |
1012 | devfs_remove("pt/%dn", unit); | 1012 | devfs_remove("pt/%dn", unit); |
1013 | } | 1013 | } |
1014 | class_simple_destroy(pt_class); | 1014 | class_destroy(pt_class); |
1015 | devfs_remove("pt"); | 1015 | devfs_remove("pt"); |
1016 | unregister_chrdev(major, name); | 1016 | unregister_chrdev(major, name); |
1017 | for (unit = 0; unit < PT_UNITS; unit++) | 1017 | for (unit = 0; unit < PT_UNITS; unit++) |