Commit 8b613e1c authored by Adam Belay's avatar Adam Belay Committed by Linus Torvalds

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 15b370c9
...@@ -303,14 +303,12 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char ...@@ -303,14 +303,12 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char
down_write(&dev->dev.bus->subsys.rwsem); down_write(&dev->dev.bus->subsys.rwsem);
dev->card_link = clink; dev->card_link = clink;
dev->dev.driver = &drv->link.driver; dev->dev.driver = &drv->link.driver;
if (drv->link.driver.probe) { if (pnp_bus_type.probe(&dev->dev)) {
if (drv->link.driver.probe(&dev->dev)) {
dev->dev.driver = NULL; dev->dev.driver = NULL;
dev->card_link = NULL; dev->card_link = NULL;
up_write(&dev->dev.bus->subsys.rwsem); up_write(&dev->dev.bus->subsys.rwsem);
return NULL; return NULL;
} }
}
device_bind_driver(&dev->dev); device_bind_driver(&dev->dev);
up_write(&dev->dev.bus->subsys.rwsem); up_write(&dev->dev.bus->subsys.rwsem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment