diff options
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 6966aff74efe..17e96698410e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -360,7 +360,7 @@ int bus_add_device(struct device * dev) | |||
360 | if (bus) { | 360 | if (bus) { |
361 | pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); | 361 | pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); |
362 | device_attach(dev); | 362 | device_attach(dev); |
363 | klist_add_tail(&bus->klist_devices, &dev->knode_bus); | 363 | klist_add_tail(&dev->knode_bus, &bus->klist_devices); |
364 | error = device_add_attrs(bus, dev); | 364 | error = device_add_attrs(bus, dev); |
365 | if (!error) { | 365 | if (!error) { |
366 | sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id); | 366 | sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id); |
@@ -448,7 +448,7 @@ int bus_add_driver(struct device_driver * drv) | |||
448 | } | 448 | } |
449 | 449 | ||
450 | driver_attach(drv); | 450 | driver_attach(drv); |
451 | klist_add_tail(&bus->klist_drivers, &drv->knode_bus); | 451 | klist_add_tail(&drv->knode_bus, &bus->klist_drivers); |
452 | module_add_driver(drv->owner, drv); | 452 | module_add_driver(drv->owner, drv); |
453 | 453 | ||
454 | driver_add_attrs(bus, drv); | 454 | driver_add_attrs(bus, drv); |