diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-05-31 01:52:10 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-18 11:06:24 -0400 |
commit | 3599d39a8525b01540e2c7ec8c5d0df0dd11d6cf (patch) | |
tree | fb9c0b512ac042c1b483d6ff754cd1fd8af5e135 /drivers/net/wireless/iwlwifi/iwl-debug.h | |
parent | a48709c5d076aa3a3f9b6426f462abe6bf432b11 (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 <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index c844b512e563..eb95d1a37487 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -32,10 +32,10 @@ | |||
32 | struct iwl_priv; | 32 | struct iwl_priv; |
33 | extern u32 iwl_debug_level; | 33 | extern u32 iwl_debug_level; |
34 | 34 | ||
35 | #define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a) | 35 | #define IWL_ERR(p, f, a...) dev_err(p->bus.ops->get_dev(&p->bus), f, ## a) |
36 | #define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a) | 36 | #define IWL_WARN(p, f, a...) dev_warn(p->bus.ops->get_dev(&p->bus), f, ## a) |
37 | #define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a) | 37 | #define IWL_INFO(p, f, a...) dev_info(p->bus.ops->get_dev(&p->bus), f, ## a) |
38 | #define IWL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a) | 38 | #define IWL_CRIT(p, f, a...) dev_crit(p->bus.ops->get_dev(&p->bus), f, ## a) |
39 | 39 | ||
40 | #define iwl_print_hex_error(priv, p, len) \ | 40 | #define iwl_print_hex_error(priv, p, len) \ |
41 | do { \ | 41 | do { \ |