diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoechr.c | 10 | ||||
-rw-r--r-- | drivers/block/paride/pg.c | 14 | ||||
-rw-r--r-- | drivers/block/paride/pt.c | 20 |
3 files changed, 22 insertions, 22 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c index 14aeca3e2e8c..45a243096187 100644 --- a/drivers/block/aoe/aoechr.c +++ b/drivers/block/aoe/aoechr.c | |||
@@ -36,7 +36,7 @@ static int emsgs_head_idx, emsgs_tail_idx; | |||
36 | static struct semaphore emsgs_sema; | 36 | static struct semaphore emsgs_sema; |
37 | static spinlock_t emsgs_lock; | 37 | static spinlock_t emsgs_lock; |
38 | static int nblocked_emsgs_readers; | 38 | static int nblocked_emsgs_readers; |
39 | static struct class_simple *aoe_class; | 39 | static struct class *aoe_class; |
40 | static struct aoe_chardev chardevs[] = { | 40 | static struct aoe_chardev chardevs[] = { |
41 | { MINOR_ERR, "err" }, | 41 | { MINOR_ERR, "err" }, |
42 | { MINOR_DISCOVER, "discover" }, | 42 | { MINOR_DISCOVER, "discover" }, |
@@ -218,13 +218,13 @@ aoechr_init(void) | |||
218 | } | 218 | } |
219 | sema_init(&emsgs_sema, 0); | 219 | sema_init(&emsgs_sema, 0); |
220 | spin_lock_init(&emsgs_lock); | 220 | spin_lock_init(&emsgs_lock); |
221 | aoe_class = class_simple_create(THIS_MODULE, "aoe"); | 221 | aoe_class = class_create(THIS_MODULE, "aoe"); |
222 | if (IS_ERR(aoe_class)) { | 222 | if (IS_ERR(aoe_class)) { |
223 | unregister_chrdev(AOE_MAJOR, "aoechr"); | 223 | unregister_chrdev(AOE_MAJOR, "aoechr"); |
224 | return PTR_ERR(aoe_class); | 224 | return PTR_ERR(aoe_class); |
225 | } | 225 | } |
226 | for (i = 0; i < ARRAY_SIZE(chardevs); ++i) | 226 | for (i = 0; i < ARRAY_SIZE(chardevs); ++i) |
227 | class_simple_device_add(aoe_class, | 227 | class_device_create(aoe_class, |
228 | MKDEV(AOE_MAJOR, chardevs[i].minor), | 228 | MKDEV(AOE_MAJOR, chardevs[i].minor), |
229 | NULL, chardevs[i].name); | 229 | NULL, chardevs[i].name); |
230 | 230 | ||
@@ -237,8 +237,8 @@ aoechr_exit(void) | |||
237 | int i; | 237 | int i; |
238 | 238 | ||
239 | for (i = 0; i < ARRAY_SIZE(chardevs); ++i) | 239 | for (i = 0; i < ARRAY_SIZE(chardevs); ++i) |
240 | class_simple_device_remove(MKDEV(AOE_MAJOR, chardevs[i].minor)); | 240 | class_device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor)); |
241 | class_simple_destroy(aoe_class); | 241 | class_destroy(aoe_class); |
242 | unregister_chrdev(AOE_MAJOR, "aoechr"); | 242 | unregister_chrdev(AOE_MAJOR, "aoechr"); |
243 | } | 243 | } |
244 | 244 | ||
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index dbeb107bb971..84d8e291ed96 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c | |||
@@ -222,7 +222,7 @@ static int pg_identify(struct pg *dev, int log); | |||
222 | 222 | ||
223 | static char pg_scratch[512]; /* scratch block buffer */ | 223 | static char pg_scratch[512]; /* scratch block buffer */ |
224 | 224 | ||
225 | static struct class_simple *pg_class; | 225 | static struct class *pg_class; |
226 | 226 | ||
227 | /* kernel glue structures */ | 227 | /* kernel glue structures */ |
228 | 228 | ||
@@ -666,7 +666,7 @@ static int __init pg_init(void) | |||
666 | err = -1; | 666 | err = -1; |
667 | goto out; | 667 | goto out; |
668 | } | 668 | } |
669 | pg_class = class_simple_create(THIS_MODULE, "pg"); | 669 | pg_class = class_create(THIS_MODULE, "pg"); |
670 | if (IS_ERR(pg_class)) { | 670 | if (IS_ERR(pg_class)) { |
671 | err = PTR_ERR(pg_class); | 671 | err = PTR_ERR(pg_class); |
672 | goto out_chrdev; | 672 | goto out_chrdev; |
@@ -675,7 +675,7 @@ static int __init pg_init(void) | |||
675 | for (unit = 0; unit < PG_UNITS; unit++) { | 675 | for (unit = 0; unit < PG_UNITS; unit++) { |
676 | struct pg *dev = &devices[unit]; | 676 | struct pg *dev = &devices[unit]; |
677 | if (dev->present) { | 677 | if (dev->present) { |
678 | class_simple_device_add(pg_class, MKDEV(major, unit), | 678 | class_device_create(pg_class, MKDEV(major, unit), |
679 | NULL, "pg%u", unit); | 679 | NULL, "pg%u", unit); |
680 | err = devfs_mk_cdev(MKDEV(major, unit), | 680 | err = devfs_mk_cdev(MKDEV(major, unit), |
681 | S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", | 681 | S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", |
@@ -688,8 +688,8 @@ static int __init pg_init(void) | |||
688 | goto out; | 688 | goto out; |
689 | 689 | ||
690 | out_class: | 690 | out_class: |
691 | class_simple_device_remove(MKDEV(major, unit)); | 691 | class_device_destroy(pg_class, MKDEV(major, unit)); |
692 | class_simple_destroy(pg_class); | 692 | class_destroy(pg_class); |
693 | out_chrdev: | 693 | out_chrdev: |
694 | unregister_chrdev(major, "pg"); | 694 | unregister_chrdev(major, "pg"); |
695 | out: | 695 | out: |
@@ -703,11 +703,11 @@ static void __exit pg_exit(void) | |||
703 | for (unit = 0; unit < PG_UNITS; unit++) { | 703 | for (unit = 0; unit < PG_UNITS; unit++) { |
704 | struct pg *dev = &devices[unit]; | 704 | struct pg *dev = &devices[unit]; |
705 | if (dev->present) { | 705 | if (dev->present) { |
706 | class_simple_device_remove(MKDEV(major, unit)); | 706 | class_device_destroy(pg_class, MKDEV(major, unit)); |
707 | devfs_remove("pg/%u", unit); | 707 | devfs_remove("pg/%u", unit); |
708 | } | 708 | } |
709 | } | 709 | } |
710 | class_simple_destroy(pg_class); | 710 | class_destroy(pg_class); |
711 | devfs_remove("pg"); | 711 | devfs_remove("pg"); |
712 | unregister_chrdev(major, name); | 712 | unregister_chrdev(major, name); |
713 | 713 | ||
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++) |