diff options
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r-- | drivers/base/class.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index a863bb091e11..8ad98924cddb 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -71,7 +71,7 @@ static struct kobj_type class_ktype = { | |||
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* Hotplug events for classes go to the class_obj subsys */ | 73 | /* Hotplug events for classes go to the class_obj subsys */ |
74 | static decl_subsys(class, &class_ktype, NULL); | 74 | static decl_subsys(class, NULL); |
75 | 75 | ||
76 | 76 | ||
77 | int class_create_file(struct class * cls, const struct class_attribute * attr) | 77 | int class_create_file(struct class * cls, const struct class_attribute * attr) |
@@ -150,6 +150,7 @@ int class_register(struct class * cls) | |||
150 | return error; | 150 | return error; |
151 | 151 | ||
152 | cls->subsys.kobj.kset = &class_subsys; | 152 | cls->subsys.kobj.kset = &class_subsys; |
153 | cls->subsys.kobj.ktype = &class_ktype; | ||
153 | 154 | ||
154 | error = subsystem_register(&cls->subsys); | 155 | error = subsystem_register(&cls->subsys); |
155 | if (!error) { | 156 | if (!error) { |
@@ -452,7 +453,7 @@ static struct kset_uevent_ops class_uevent_ops = { | |||
452 | .uevent = class_uevent, | 453 | .uevent = class_uevent, |
453 | }; | 454 | }; |
454 | 455 | ||
455 | static decl_subsys(class_obj, &class_device_ktype, &class_uevent_ops); | 456 | static decl_subsys(class_obj, &class_uevent_ops); |
456 | 457 | ||
457 | 458 | ||
458 | static int class_device_add_attrs(struct class_device * cd) | 459 | static int class_device_add_attrs(struct class_device * cd) |
@@ -537,7 +538,8 @@ static struct class_device_attribute class_uevent_attr = | |||
537 | 538 | ||
538 | void class_device_initialize(struct class_device *class_dev) | 539 | void class_device_initialize(struct class_device *class_dev) |
539 | { | 540 | { |
540 | kobj_set_kset_s(class_dev, class_obj_subsys); | 541 | class_dev->kobj.kset = &class_obj_subsys; |
542 | class_dev->kobj.ktype = &class_device_ktype; | ||
541 | kobject_init(&class_dev->kobj); | 543 | kobject_init(&class_dev->kobj); |
542 | INIT_LIST_HEAD(&class_dev->node); | 544 | INIT_LIST_HEAD(&class_dev->node); |
543 | } | 545 | } |