diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-23 12:52:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:07 -0400 |
commit | deb3697037a7d362d13468a73643e09cbc1615a8 (patch) | |
tree | 1123942229b7edc193045300d1badb2018dc2bf0 /drivers/block/aoe | |
parent | 619e666b7e9d2b0545ab60a9c824ae5f77c20c3b (diff) |
[PATCH] class: convert drivers/block/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoechr.c | 10 |
1 files changed, 5 insertions, 5 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 | ||