diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:30:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 15:31:07 -0800 |
commit | 0d34052dfeba307ebc18d2f672e80e3f419714d4 (patch) | |
tree | 8f7955328cd9700c443c33f88631449a0c1208fb /drivers/base/dd.c | |
parent | f0fb2eb7bd76b9927f1350cfb0a3653385b82c6c (diff) | |
parent | 926beadb3dfaddccb3348a5b9e6c2a1f8290a220 (diff) | |
download | linux-0d34052dfeba307ebc18d2f672e80e3f419714d4.tar.gz linux-0d34052dfeba307ebc18d2f672e80e3f419714d4.tar.bz2 linux-0d34052dfeba307ebc18d2f672e80e3f419714d4.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
Revert "driver core: create a private portion of struct device"
Revert "driver core: move klist_children into private structure"
Revert "driver core: move knode_driver into private structure"
Revert "driver core: move knode_bus into private structure"
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 6fdaf76f033f..315bed8d5e7f 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -28,7 +28,7 @@ static void driver_bound(struct device *dev) { - if (klist_node_attached(&dev->p->knode_driver)) { + if (klist_node_attached(&dev->knode_driver)) { printk(KERN_WARNING "%s: device %s already bound\n", __func__, kobject_name(&dev->kobj)); return; @@ -41,7 +41,7 @@ static void driver_bound(struct device *dev) blocking_notifier_call_chain(&dev->bus->p->bus_notifier, BUS_NOTIFY_BOUND_DRIVER, dev); - klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices); + klist_add_tail(&dev->knode_driver, &dev->driver->p->klist_devices); } static int driver_sysfs_add(struct device *dev) @@ -310,7 +310,7 @@ static void __device_release_driver(struct device *dev) drv->remove(dev); devres_release_all(dev); dev->driver = NULL; - klist_remove(&dev->p->knode_driver); + klist_remove(&dev->knode_driver); } } @@ -340,7 +340,6 @@ EXPORT_SYMBOL_GPL(device_release_driver); */ void driver_detach(struct device_driver *drv) { - struct device_private *dev_prv; struct device *dev; for (;;) { @@ -349,10 +348,8 @@ void driver_detach(struct device_driver *drv) spin_unlock(&drv->p->klist_devices.k_lock); break; } - dev_prv = list_entry(drv->p->klist_devices.k_list.prev, - struct device_private, - knode_driver.n_node); - dev = dev_prv->device; + dev = list_entry(drv->p->klist_devices.k_list.prev, + struct device, knode_driver.n_node); get_device(dev); spin_unlock(&drv->p->klist_devices.k_lock); |