[PATCH] pnp bus type fix
authorAdam Belay <ambx1@neo.rr.com>
Wed, 1 Mar 2006 00:59:10 +0000 (16:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Mar 2006 04:53:43 +0000 (20:53 -0800)
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>
drivers/pnp/card.c

index aaa568a3806ea9e35873803f646989c9a3487a53..b68eef251614c68a55ecadd069f7e76e45ff20cf 100644 (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);