diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-helpers.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h index 45af5bbc1c56..51a67fb2e185 100644 --- a/drivers/net/wireless/iwlwifi/iwl-helpers.h +++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h | |||
@@ -80,8 +80,8 @@ static inline void iwl_free_fw_desc(struct pci_dev *pci_dev, | |||
80 | struct fw_desc *desc) | 80 | struct fw_desc *desc) |
81 | { | 81 | { |
82 | if (desc->v_addr) | 82 | if (desc->v_addr) |
83 | pci_free_consistent(pci_dev, desc->len, | 83 | dma_free_coherent(&pci_dev->dev, desc->len, |
84 | desc->v_addr, desc->p_addr); | 84 | desc->v_addr, desc->p_addr); |
85 | desc->v_addr = NULL; | 85 | desc->v_addr = NULL; |
86 | desc->len = 0; | 86 | desc->len = 0; |
87 | } | 87 | } |
@@ -89,7 +89,8 @@ static inline void iwl_free_fw_desc(struct pci_dev *pci_dev, | |||
89 | static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev, | 89 | static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev, |
90 | struct fw_desc *desc) | 90 | struct fw_desc *desc) |
91 | { | 91 | { |
92 | desc->v_addr = pci_alloc_consistent(pci_dev, desc->len, &desc->p_addr); | 92 | desc->v_addr = dma_alloc_coherent(&pci_dev->dev, desc->len, |
93 | &desc->p_addr, GFP_KERNEL); | ||
93 | return (desc->v_addr != NULL) ? 0 : -ENOMEM; | 94 | return (desc->v_addr != NULL) ? 0 : -ENOMEM; |
94 | } | 95 | } |
95 | 96 | ||