Skip to content

Commit

Permalink
[PATCH] pnp bus type fix
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Adam Belay authored and Linus Torvalds committed Mar 1, 2006
1 parent 15b370c commit 8b613e1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,11 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char
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);
Expand Down

0 comments on commit 8b613e1

Please sign in to comment.