aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authormochel@digitalimplant.org <mochel@digitalimplant.org>2005-03-21 12:25:36 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 15:15:16 -0700
commit94e7b1c5ff2055571703e38b059afffe17658432 (patch)
tree469dbd920087ec62acd88b4985437a78c6786c0e /drivers/base/core.c
parent38fdac3cdce276554b4484a41f8ec2daf81cb2ff (diff)
[PATCH] Add a klist to struct device_driver for the devices bound to it.
- Use it in driver_for_each_device() instead of the regular list_head and stop using the bus's rwsem for protection. - Use driver_for_each_device() in driver_detach() so we don't deadlock on the bus's rwsem. - Remove ->devices. - Move klist access and sysfs link access out from under device's semaphore, since they're synchronized through other means. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 93440824b800..bc5bec61a01a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -209,8 +209,8 @@ void device_initialize(struct device *dev)
kobject_init(&dev->kobj);
INIT_LIST_HEAD(&dev->node);
INIT_LIST_HEAD(&dev->children);
- INIT_LIST_HEAD(&dev->driver_list);
INIT_LIST_HEAD(&dev->bus_list);
+ INIT_LIST_HEAD(&dev->driver_list);
INIT_LIST_HEAD(&dev->dma_pools);
init_MUTEX(&dev->sem);
}