aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-12-19 10:37:31 +0800
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:15 -0500
commit978785a3892b34448446e8c8a17f48454f1bdd6a (patch)
tree76d50b34bc166d9400c99335c533a4681ff8887a /drivers/net/wireless/iwlwifi/iwl-debug.h
parent146846aed534aa0eb1fb0a8e6c0394190e5c1ad7 (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.h12
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 fa0eb8f20cd..d593b83873e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -31,6 +31,13 @@
struct iwl_priv;
+#define IWL_ERROR(f, a...) dev_err(&(priv->pci_dev->dev), f, ## a)
+#define IWL_WARNING(f, a...) dev_warn(&(priv->pci_dev->dev), f, ## a)
+#define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a)
+#define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a)
+#define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a)
+#define IWL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a)
+
#ifdef CONFIG_IWLWIFI_DEBUG
#define IWL_DEBUG(level, fmt, args...) \
do { \
@@ -164,11 +171,6 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
#define IWL_DL_TX_REPLY (1 << 30)
#define IWL_DL_QOS (1 << 31)
-#define IWL_ERROR(f, a...) \
- dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), f, ## a)
-#define IWL_WARNING(f, a...) \
- dev_printk(KERN_WARNING, &(priv->hw->wiphy->dev), f, ## a)
-
#define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a)
#define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a)
#define IWL_DEBUG_MACDUMP(f, a...) IWL_DEBUG(IWL_DL_MACDUMP, f, ## a)