summaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-11-23 15:43:50 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-23 23:03:06 -0800
commit2b08c8d0468866f86da97f836c6ac14338cb81a9 (patch)
treeeca60a3b6811a825cd3642a666aa523a18fe484b /drivers/base/dd.c
parent133747e8d1e912863edfb3869e36b97b9939d4fc (diff)
[PATCH] Small fixes to driver core
This patch (as603) makes a few small fixes to the driver core: Change spin_lock_irq for a klist lock to spin_lock; Fix reference count leaks; Minor spelling and formatting changes. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r--drivers/base/dd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 3565e979530..3b419c9a1e7 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -62,7 +62,6 @@ void device_bind_driver(struct device * dev)
* because we don't know the format of the ID structures, nor what
* is to be considered a match and what is not.
*
- *
* This function returns 1 if a match is found, an error if one
* occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.
*
@@ -158,7 +157,6 @@ static int __driver_attach(struct device * dev, void * data)
driver_probe_device(drv, dev);
up(&dev->sem);
-
return 0;
}
@@ -225,15 +223,15 @@ void driver_detach(struct device_driver * drv)
struct device * dev;
for (;;) {
- spin_lock_irq(&drv->klist_devices.k_lock);
+ spin_lock(&drv->klist_devices.k_lock);
if (list_empty(&drv->klist_devices.k_list)) {
- spin_unlock_irq(&drv->klist_devices.k_lock);
+ spin_unlock(&drv->klist_devices.k_lock);
break;
}
dev = list_entry(drv->klist_devices.k_list.prev,
struct device, knode_driver.n_node);
get_device(dev);
- spin_unlock_irq(&drv->klist_devices.k_lock);
+ spin_unlock(&drv->klist_devices.k_lock);
down(&dev->sem);
if (dev->driver == drv)