aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
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 3565e9795301..3b419c9a1e7e 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -62,7 +62,6 @@ void device_bind_driver(struct device * dev)
62 * because we don't know the format of the ID structures, nor what 62 * because we don't know the format of the ID structures, nor what
63 * is to be considered a match and what is not. 63 * is to be considered a match and what is not.
64 * 64 *
65 *
66 * This function returns 1 if a match is found, an error if one 65 * This function returns 1 if a match is found, an error if one
67 * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise. 66 * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.
68 * 67 *
@@ -158,7 +157,6 @@ static int __driver_attach(struct device * dev, void * data)
158 driver_probe_device(drv, dev); 157 driver_probe_device(drv, dev);
159 up(&dev->sem); 158 up(&dev->sem);
160 159
161
162 return 0; 160 return 0;
163} 161}
164 162
@@ -225,15 +223,15 @@ void driver_detach(struct device_driver * drv)
225 struct device * dev; 223 struct device * dev;
226 224
227 for (;;) { 225 for (;;) {
228 spin_lock_irq(&drv->klist_devices.k_lock); 226 spin_lock(&drv->klist_devices.k_lock);
229 if (list_empty(&drv->klist_devices.k_list)) { 227 if (list_empty(&drv->klist_devices.k_list)) {
230 spin_unlock_irq(&drv->klist_devices.k_lock); 228 spin_unlock(&drv->klist_devices.k_lock);
231 break; 229 break;
232 } 230 }
233 dev = list_entry(drv->klist_devices.k_list.prev, 231 dev = list_entry(drv->klist_devices.k_list.prev,
234 struct device, knode_driver.n_node); 232 struct device, knode_driver.n_node);
235 get_device(dev); 233 get_device(dev);
236 spin_unlock_irq(&drv->klist_devices.k_lock); 234 spin_unlock(&drv->klist_devices.k_lock);
237 235
238 down(&dev->sem); 236 down(&dev->sem);
239 if (dev->driver == drv) 237 if (dev->driver == drv)