diff options
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 9a19b071c573..630956037e18 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -166,7 +166,7 @@ static struct kset_uevent_ops bus_uevent_ops = { | |||
166 | .filter = bus_uevent_filter, | 166 | .filter = bus_uevent_filter, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static decl_subsys(bus, &bus_ktype, &bus_uevent_ops); | 169 | static decl_subsys(bus, &bus_uevent_ops); |
170 | 170 | ||
171 | 171 | ||
172 | #ifdef CONFIG_HOTPLUG | 172 | #ifdef CONFIG_HOTPLUG |
@@ -639,6 +639,7 @@ int bus_add_driver(struct device_driver *drv) | |||
639 | if (error) | 639 | if (error) |
640 | goto out_put_bus; | 640 | goto out_put_bus; |
641 | drv->kobj.kset = &bus->drivers; | 641 | drv->kobj.kset = &bus->drivers; |
642 | drv->kobj.ktype = &driver_ktype; | ||
642 | error = kobject_register(&drv->kobj); | 643 | error = kobject_register(&drv->kobj); |
643 | if (error) | 644 | if (error) |
644 | goto out_put_bus; | 645 | goto out_put_bus; |
@@ -851,6 +852,7 @@ int bus_register(struct bus_type * bus) | |||
851 | goto out; | 852 | goto out; |
852 | 853 | ||
853 | bus->subsys.kobj.kset = &bus_subsys; | 854 | bus->subsys.kobj.kset = &bus_subsys; |
855 | bus->subsys.kobj.ktype = &bus_ktype; | ||
854 | 856 | ||
855 | retval = subsystem_register(&bus->subsys); | 857 | retval = subsystem_register(&bus->subsys); |
856 | if (retval) | 858 | if (retval) |
@@ -868,7 +870,6 @@ int bus_register(struct bus_type * bus) | |||
868 | 870 | ||
869 | kobject_set_name(&bus->drivers.kobj, "drivers"); | 871 | kobject_set_name(&bus->drivers.kobj, "drivers"); |
870 | bus->drivers.kobj.parent = &bus->subsys.kobj; | 872 | bus->drivers.kobj.parent = &bus->subsys.kobj; |
871 | bus->drivers.ktype = &driver_ktype; | ||
872 | retval = kset_register(&bus->drivers); | 873 | retval = kset_register(&bus->drivers); |
873 | if (retval) | 874 | if (retval) |
874 | goto bus_drivers_fail; | 875 | goto bus_drivers_fail; |