mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
aoechr: Convert from class_device to device
Signed-off-by: Tony Jones <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Sam Hopkins <[email protected]> Cc: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
41ca28ab2a
commit
7ea7ed01ff
1 changed files with 3 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue