1
0
Fork 0

[PATCH] pnp bus type fix

This is Adam's pnp probing fix.  It's been reported to fix hangs on several
people's machines.  I don't know if it's official or final, and Adam isn't
contactable at present.  But I'm not aware of the patch causing any
regressions.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
hifive-unleashed-5.1
Adam Belay 2006-02-28 16:59:10 -08:00 committed by Linus Torvalds
parent 15b370c95c
commit 8b613e1ccf
1 changed files with 5 additions and 7 deletions

View File

@ -303,13 +303,11 @@ found:
down_write(&dev->dev.bus->subsys.rwsem);
dev->card_link = clink;
dev->dev.driver = &drv->link.driver;
if (drv->link.driver.probe) {
if (drv->link.driver.probe(&dev->dev)) {
dev->dev.driver = NULL;
dev->card_link = NULL;
up_write(&dev->dev.bus->subsys.rwsem);
return NULL;
}
if (pnp_bus_type.probe(&dev->dev)) {
dev->dev.driver = NULL;
dev->card_link = NULL;
up_write(&dev->dev.bus->subsys.rwsem);
return NULL;
}
device_bind_driver(&dev->dev);
up_write(&dev->dev.bus->subsys.rwsem);