mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
460f7e9a1b
commit
21c7f30b1d
4 changed files with 33 additions and 40 deletions
|
|
@ -434,11 +434,6 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
|
|||
drv->driver.mod_name = mod_name;
|
||||
drv->driver.kobj.ktype = &pci_driver_kobj_type;
|
||||
|
||||
if (pci_multithread_probe)
|
||||
drv->driver.multithread_probe = pci_multithread_probe;
|
||||
else
|
||||
drv->driver.multithread_probe = drv->multithread_probe;
|
||||
|
||||
spin_lock_init(&drv->dynids.lock);
|
||||
INIT_LIST_HEAD(&drv->dynids.list);
|
||||
|
||||
|
|
@ -574,6 +569,7 @@ struct bus_type pci_bus_type = {
|
|||
|
||||
static int __init pci_driver_init(void)
|
||||
{
|
||||
pci_bus_type.multithread_probe = pci_multithread_probe;
|
||||
return bus_register(&pci_bus_type);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue