2007-08-20 22:53:31

by Tony Jones

[permalink] [raw]
Subject: [patch 03/14] Convert from class_device to device for block/aoechr

--
Content-Disposition: inline; filename=aoechr.patch

Convert from class_device to device for block/aoechr. This is part of the
work to eliminate struct class_device.

---
drivers/block/aoe/aoechr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -259,9 +259,8 @@ aoechr_init(void)
return PTR_ERR(aoe_class);
}
for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
- class_device_create(aoe_class, NULL,
- MKDEV(AOE_MAJOR, chardevs[i].minor),
- NULL, chardevs[i].name);
+ device_create(aoe_class, NULL,
+ MKDEV(AOE_MAJOR, chardevs[i].minor), chardevs[i].name);

return 0;
}
@@ -272,7 +271,7 @@ aoechr_exit(void)
int i;

for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
- class_device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor));
+ device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor));
class_destroy(aoe_class);
unregister_chrdev(AOE_MAJOR, "aoechr");
}

--


2007-08-21 15:01:23

by Tony Jones

[permalink] [raw]
Subject: Re: [patch 03/14] Convert from class_device to device for block/aoechr

On Mon, Aug 20, 2007 at 03:48:09PM -0700, [email protected] wrote:
> --
> Content-Disposition: inline; filename=aoechr.patch
>
> Convert from class_device to device for block/aoechr. This is part of the
> work to eliminate struct class_device.

Signed-off-by: Tony Jones <[email protected]>