]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/ipw2100.c
[PATCH] ipw2100: Fix deadlock detected by lockdep
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / ipw2100.c
index 54437206f31e14ac967b0c4c45c4e660a432729a..5d5dab6a209c297a94e2be1fad17a3399acba46f 100644 (file)
@@ -134,7 +134,6 @@ that only one external action is invoked at a time.
 */
 
 #include <linux/compiler.h>
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
 #include <linux/in6.h>
@@ -167,7 +166,7 @@ that only one external action is invoked at a time.
 
 #include "ipw2100.h"
 
-#define IPW2100_VERSION "git-1.1.4"
+#define IPW2100_VERSION "git-1.2.2"
 
 #define DRV_NAME       "ipw2100"
 #define DRV_VERSION    IPW2100_VERSION
@@ -194,7 +193,6 @@ static struct ipw2100_fw ipw2100_firmware;
 #endif
 
 #include <linux/moduleparam.h>
-#include <linux/mutex.h>
 module_param(debug, int, 0444);
 module_param(mode, int, 0444);
 module_param(channel, int, 0444);
@@ -1486,7 +1484,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
                 *
                 * Sending the PREPARE_FOR_POWER_DOWN will restrict the
                 * hardware from going into standby mode and will transition
-                * out of D0-standy if it is already in that state.
+                * out of D0-standby if it is already in that state.
                 *
                 * STATUS_PREPARE_POWER_DOWN_COMPLETE will be sent by the
                 * driver upon completion.  Once received, the driver can
@@ -5359,7 +5357,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
                     idx, keylen, len);
 
        /* NOTE: We don't check cached values in case the firmware was reset
-        * or some other problem is occuring.  If the user is setting the key,
+        * or some other problem is occurring.  If the user is setting the key,
         * then we push the change */
 
        wep_key->idx = idx;
@@ -6231,7 +6229,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
        ipw2100_queues_initialize(priv);
 
        err = request_irq(pci_dev->irq,
-                         ipw2100_interrupt, SA_SHIRQ, dev->name, priv);
+                         ipw2100_interrupt, IRQF_SHARED, dev->name, priv);
        if (err) {
                printk(KERN_WARNING DRV_NAME
                       "Error calling request_irq: %d.\n", pci_dev->irq);
@@ -6256,13 +6254,14 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
         * member to call a function that then just turns and calls ipw2100_up.
         * net_dev->init is called after name allocation but before the
         * notifier chain is called */
-       mutex_lock(&priv->action_mutex);
        err = register_netdev(dev);
        if (err) {
                printk(KERN_WARNING DRV_NAME
                       "Error calling register_netdev.\n");
-               goto fail_unlock;
+               goto fail;
        }
+
+       mutex_lock(&priv->action_mutex);
        registered = 1;
 
        IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev));