path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
authorEmmanuel Grumbach <>2011-05-31 08:52:10 +0300
committerWey-Yi Guy <>2011-06-18 08:06:24 -0700
commit3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf (patch)
treefb9c0b512ac042c1b483d6ff754cd1fd8af5e135 /drivers/net/wireless/iwlwifi/iwl-agn-tx.c
parenta48709c5d076aa3a3f9b6426f462abe6bf432b11 (diff)
iwlagn: add get_dev to iwl_bus_ops
Bus specific layer must know how to return the struct device* of the device. Implement that as a callback of iwl_bus_ops and use that callback instead of using the priv->pdev pointer which is meant to disappear soon. Since the struct device * is needed in hot path, iwl_bus holds a pointer to it instead of calling get_dev all the time. Signed-off-by: Emmanuel Grumbach <> Signed-off-by: Wey-Yi Guy <>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 8bd48f61a9f5..f4e5edefd066 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -834,8 +834,8 @@ drop_unlock_priv:
static inline int iwlagn_alloc_dma_ptr(struct iwl_priv *priv,
struct iwl_dma_ptr *ptr, size_t size)
- ptr->addr = dma_alloc_coherent(&priv->pci_dev->dev, size, &ptr->dma,
+ ptr->addr = dma_alloc_coherent(priv->, size,
+ &ptr->dma, GFP_KERNEL);
if (!ptr->addr)
return -ENOMEM;
ptr->size = size;
@@ -848,7 +848,8 @@ static inline void iwlagn_free_dma_ptr(struct iwl_priv *priv,
if (unlikely(!ptr->addr))
- dma_free_coherent(&priv->pci_dev->dev, ptr->size, ptr->addr, ptr->dma);
+ dma_free_coherent(priv->,
+ ptr->size, ptr->addr, ptr->dma);
memset(ptr, 0, sizeof(*ptr));