iwlwifi: don't init trans->reg_lock from the op_mode
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 23 Apr 2012 22:03:06 +0000 (15:03 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 00:56:09 +0000 (20:56 -0400)
This doesn't make any sense. Init it from the transport instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c

index 00a8f954200ce88d877e63ec3afa554f77f1c1ab..5f158646479f2be32d5a88e1cf889be1931c4193 100644 (file)
@@ -1588,7 +1588,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
        /* these spin locks will be used in apm_ops.init and EEPROM access
         * we should init now
         */
-       spin_lock_init(&priv->trans->reg_lock);
        spin_lock_init(&priv->statistics.lock);
 
        /***********************
index 63557bb85cdaa6d064f603ab148b07a9971b58dd..2e57161854b901187f40a50628db2fdf6b4c8ac0 100644 (file)
@@ -2175,6 +2175,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
 
        /* Initialize the wait queue for commands */
        init_waitqueue_head(&trans->wait_command_queue);
+       spin_lock_init(&trans->reg_lock);
 
        return trans;