summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-05-31 08:52:10 +0300
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-06-18 08:06:24 -0700
commit3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf (patch)
treefb9c0b512ac042c1b483d6ff754cd1fd8af5e135 /drivers/net/wireless/iwlwifi/iwl-tx.c
parenta48709c5d076aa3a3f9b6426f462abe6bf432b11 (diff)
downloadlinux-3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf.tar.gz
linux-3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf.tar.bz2
linux-3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf.zip
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 <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 1084fe0e8a86..f982ac9b8ba2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -266,7 +266,7 @@ void iwl_tx_queue_unmap(struct iwl_priv *priv, int txq_id)
void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id)
{
struct iwl_tx_queue *txq = &priv->txq[txq_id];
- struct device *dev = &priv->pci_dev->dev;
+ struct device *dev = priv->bus.dev;
int i;
iwl_tx_queue_unmap(priv, txq_id);
@@ -332,7 +332,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv)
void iwl_cmd_queue_free(struct iwl_priv *priv)
{
struct iwl_tx_queue *txq = &priv->txq[priv->cmd_queue];
- struct device *dev = &priv->pci_dev->dev;
+ struct device *dev = priv->bus.dev;
int i;
iwl_cmd_queue_unmap(priv);
@@ -434,7 +434,7 @@ static int iwl_queue_init(struct iwl_priv *priv, struct iwl_queue *q,
static int iwl_tx_queue_alloc(struct iwl_priv *priv,
struct iwl_tx_queue *txq, u32 id)
{
- struct device *dev = &priv->pci_dev->dev;
+ struct device *dev = priv->bus.dev;
size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
/* Driver private data, only for Tx (not command) queues,