aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2007-02-05 19:15:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:28 -0400
commit21c7f30b1d3f8a3de3128478daca3ce203fc8733 (patch)
treeff84247ba68f82906182a214273dd330c6d1970f /drivers/pci/pci-driver.c
parent460f7e9a1bde2c74f060f7ce0a308dab4be6a56b (diff)
driver core: per-subsystem multithreaded probing
Make multithreaded probing work per subsystem instead of per driver. It doesn't make much sense to probe the same device for multiple drivers in parallel (after all, only one driver can bind to the device). Instead, create a probing thread for each device that probes the drivers one after another. Also make the decision to use multi-threaded probe per bus instead of per device and adapt the pci code. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index a3c1755b2f28..39e80fcef4b3 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -434,11 +434,6 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
434 drv->driver.mod_name = mod_name; 434 drv->driver.mod_name = mod_name;
435 drv->driver.kobj.ktype = &pci_driver_kobj_type; 435 drv->driver.kobj.ktype = &pci_driver_kobj_type;
436 436
437 if (pci_multithread_probe)
438 drv->driver.multithread_probe = pci_multithread_probe;
439 else
440 drv->driver.multithread_probe = drv->multithread_probe;
441
442 spin_lock_init(&drv->dynids.lock); 437 spin_lock_init(&drv->dynids.lock);
443 INIT_LIST_HEAD(&drv->dynids.list); 438 INIT_LIST_HEAD(&drv->dynids.list);
444 439
@@ -574,6 +569,7 @@ struct bus_type pci_bus_type = {
574 569
575static int __init pci_driver_init(void) 570static int __init pci_driver_init(void)
576{ 571{
572 pci_bus_type.multithread_probe = pci_multithread_probe;
577 return bus_register(&pci_bus_type); 573 return bus_register(&pci_bus_type);
578} 574}
579 575