]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pnp/card.c
[IB] mthca: Better limit checking and reporting
[linux-2.6-omap-h63xx.git] / drivers / pnp / card.c
index 3252662958d3cf3f2cb66bd562acef0fb9147a86..e95ed67d4f050afddf5918d34628e4586ba70951 100644 (file)
@@ -8,13 +8,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-
-#ifdef CONFIG_PNP_DEBUG
-       #define DEBUG
-#else
-       #undef DEBUG
-#endif
-
 #include <linux/pnp.h>
 #include "base.h"
 
@@ -259,7 +252,6 @@ int pnp_add_card_device(struct pnp_card * card, struct pnp_dev * dev)
 
 /**
  * pnp_remove_card_device- removes a device from the specified card
- * @card: pointer to the card to remove from
  * @dev: pointer to the device to remove
  */
 
@@ -274,7 +266,7 @@ void pnp_remove_card_device(struct pnp_dev * dev)
 
 /**
  * pnp_request_card_device - Searches for a PnP device under the specified card
- * @lcard: pointer to the card link, cannot be NULL
+ * @clink: pointer to the card link, cannot be NULL
  * @id: pointer to a PnP ID structure that explains the rules for finding the device
  * @from: Starting place to search from. If NULL it will start from the begining.
  */
@@ -313,6 +305,8 @@ found:
        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;
                }
        }