diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-12-18 21:37:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:15 -0500 |
commit | 978785a3892b34448446e8c8a17f48454f1bdd6a (patch) | |
tree | 76d50b34bc166d9400c99335c533a4681ff8887a /drivers/net/wireless/iwlwifi/iwl-debug.h | |
parent | 146846aed534aa0eb1fb0a8e6c0394190e5c1ad7 (diff) |
iwlwifi: clean up printing
Use IWL_ macros where possible to unify debug output usage.
Define new unconditional printouts IWL_ERR, IWL_WARN, IWL_INFO,
and IWL_CRIT which don't use hidden priv pointer.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index fa0eb8f20cd9..d593b83873e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -31,6 +31,13 @@ | |||
31 | 31 | ||
32 | struct iwl_priv; | 32 | struct iwl_priv; |
33 | 33 | ||
34 | #define IWL_ERROR(f, a...) dev_err(&(priv->pci_dev->dev), f, ## a) | ||
35 | #define IWL_WARNING(f, a...) dev_warn(&(priv->pci_dev->dev), f, ## a) | ||
36 | #define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a) | ||
37 | #define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a) | ||
38 | #define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a) | ||
39 | #define IWL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a) | ||
40 | |||
34 | #ifdef CONFIG_IWLWIFI_DEBUG | 41 | #ifdef CONFIG_IWLWIFI_DEBUG |
35 | #define IWL_DEBUG(level, fmt, args...) \ | 42 | #define IWL_DEBUG(level, fmt, args...) \ |
36 | do { \ | 43 | do { \ |
@@ -164,11 +171,6 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
164 | #define IWL_DL_TX_REPLY (1 << 30) | 171 | #define IWL_DL_TX_REPLY (1 << 30) |
165 | #define IWL_DL_QOS (1 << 31) | 172 | #define IWL_DL_QOS (1 << 31) |
166 | 173 | ||
167 | #define IWL_ERROR(f, a...) \ | ||
168 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), f, ## a) | ||
169 | #define IWL_WARNING(f, a...) \ | ||
170 | dev_printk(KERN_WARNING, &(priv->hw->wiphy->dev), f, ## a) | ||
171 | |||
172 | #define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a) | 174 | #define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a) |
173 | #define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a) | 175 | #define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a) |
174 | #define IWL_DEBUG_MACDUMP(f, a...) IWL_DEBUG(IWL_DL_MACDUMP, f, ## a) | 176 | #define IWL_DEBUG_MACDUMP(f, a...) IWL_DEBUG(IWL_DL_MACDUMP, f, ## a) |