]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
iwlwifi: driver holds its pointer to the transport
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 22 Mar 2012 15:51:44 +0000 (17:51 +0200)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Wed, 18 Apr 2012 14:30:57 +0000 (07:30 -0700)
Instead of using the shared area that we be killed.

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-drv.c

index 77262f2a4fd81b281f94662c8e2e8c979f5c91a3..8270623aff0167eb9ffca65c2223ddda9581d74c 100644 (file)
@@ -114,7 +114,7 @@ struct fw_sec {
 static void iwl_free_fw_desc(struct iwl_drv *drv, struct fw_desc *desc)
 {
        if (desc->v_addr)
-               dma_free_coherent(trans(drv)->dev, desc->len,
+               dma_free_coherent(drv->trans->dev, desc->len,
                                  desc->v_addr, desc->p_addr);
        desc->v_addr = NULL;
        desc->len = 0;
@@ -142,7 +142,7 @@ static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc,
                return -EINVAL;
        }
 
-       desc->v_addr = dma_alloc_coherent(trans(drv)->dev, sec->size,
+       desc->v_addr = dma_alloc_coherent(drv->trans->dev, sec->size,
                                          &desc->p_addr, GFP_KERNEL);
        if (!desc->v_addr)
                return -ENOMEM;
@@ -189,7 +189,7 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
                       drv->firmware_name);
 
        return request_firmware_nowait(THIS_MODULE, 1, drv->firmware_name,
-                                      trans(drv)->dev,
+                                      drv->trans->dev,
                                       GFP_KERNEL, drv, iwl_ucode_callback);
 }
 
@@ -880,7 +880,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
        release_firmware(ucode_raw);
  out_unbind:
        complete(&drv->request_firmware_complete);
-       device_release_driver(trans(drv)->dev);
+       device_release_driver(drv->trans->dev);
 }
 
 struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,