diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-03-26 21:02:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 22:02:38 -0400 |
commit | 5adc55da4a7758021bcc374904b0f8b076508a11 (patch) | |
tree | 41f113f25532c3ffc1e3194114fbc68d67ce2001 /drivers/base/dd.c | |
parent | 032de8e2fe3c0eec5fb0ffe4d38aa602dad397dc (diff) |
PCI: remove the broken PCI_MULTITHREAD_PROBE option
This patch removes the PCI_MULTITHREAD_PROBE option that had already
been marked as broken.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 18dba8e78da7..92428e55b0c2 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -226,12 +226,10 @@ static int device_probe_drivers(void *data) | |||
226 | * | 226 | * |
227 | * Walk the list of drivers that the bus has and call | 227 | * Walk the list of drivers that the bus has and call |
228 | * driver_probe_device() for each pair. If a compatible | 228 | * driver_probe_device() for each pair. If a compatible |
229 | * pair is found, break out and return. If the bus specifies | 229 | * pair is found, break out and return. |
230 | * multithreaded probing, walking the list of drivers is done | ||
231 | * on a probing thread. | ||
232 | * | 230 | * |
233 | * Returns 1 if the device was bound to a driver; | 231 | * Returns 1 if the device was bound to a driver; |
234 | * 0 if no matching device was found or multithreaded probing is done; | 232 | * 0 if no matching device was found; |
235 | * -ENODEV if the device is not registered. | 233 | * -ENODEV if the device is not registered. |
236 | * | 234 | * |
237 | * When called for a USB interface, @dev->parent->sem must be held. | 235 | * When called for a USB interface, @dev->parent->sem must be held. |
@@ -239,7 +237,6 @@ static int device_probe_drivers(void *data) | |||
239 | int device_attach(struct device * dev) | 237 | int device_attach(struct device * dev) |
240 | { | 238 | { |
241 | int ret = 0; | 239 | int ret = 0; |
242 | struct task_struct *probe_task = ERR_PTR(-ENOMEM); | ||
243 | 240 | ||
244 | down(&dev->sem); | 241 | down(&dev->sem); |
245 | if (dev->driver) { | 242 | if (dev->driver) { |
@@ -251,12 +248,7 @@ int device_attach(struct device * dev) | |||
251 | ret = 0; | 248 | ret = 0; |
252 | } | 249 | } |
253 | } else { | 250 | } else { |
254 | if (dev->bus->multithread_probe) | 251 | ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); |
255 | probe_task = kthread_run(device_probe_drivers, dev, | ||
256 | "probe-%s", dev->bus_id); | ||
257 | if(IS_ERR(probe_task)) | ||
258 | ret = bus_for_each_drv(dev->bus, NULL, dev, | ||
259 | __device_attach); | ||
260 | } | 252 | } |
261 | up(&dev->sem); | 253 | up(&dev->sem); |
262 | return ret; | 254 | return ret; |
@@ -383,33 +375,6 @@ void driver_detach(struct device_driver * drv) | |||
383 | } | 375 | } |
384 | } | 376 | } |
385 | 377 | ||
386 | #ifdef CONFIG_PCI_MULTITHREAD_PROBE | ||
387 | static int __init wait_for_probes(void) | ||
388 | { | ||
389 | DEFINE_WAIT(wait); | ||
390 | |||
391 | printk(KERN_INFO "%s: waiting for %d threads\n", __FUNCTION__, | ||
392 | atomic_read(&probe_count)); | ||
393 | if (!atomic_read(&probe_count)) | ||
394 | return 0; | ||
395 | while (atomic_read(&probe_count)) { | ||
396 | prepare_to_wait(&probe_waitqueue, &wait, TASK_UNINTERRUPTIBLE); | ||
397 | if (atomic_read(&probe_count)) | ||
398 | schedule(); | ||
399 | } | ||
400 | finish_wait(&probe_waitqueue, &wait); | ||
401 | return 0; | ||
402 | } | ||
403 | |||
404 | core_initcall_sync(wait_for_probes); | ||
405 | postcore_initcall_sync(wait_for_probes); | ||
406 | arch_initcall_sync(wait_for_probes); | ||
407 | subsys_initcall_sync(wait_for_probes); | ||
408 | fs_initcall_sync(wait_for_probes); | ||
409 | device_initcall_sync(wait_for_probes); | ||
410 | late_initcall_sync(wait_for_probes); | ||
411 | #endif | ||
412 | |||
413 | EXPORT_SYMBOL_GPL(device_bind_driver); | 378 | EXPORT_SYMBOL_GPL(device_bind_driver); |
414 | EXPORT_SYMBOL_GPL(device_release_driver); | 379 | EXPORT_SYMBOL_GPL(device_release_driver); |
415 | EXPORT_SYMBOL_GPL(device_attach); | 380 | EXPORT_SYMBOL_GPL(device_attach); |