summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/main.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-03 06:12:35 +0300
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 00:34:39 +0300
commit21a99f934949807dc0c9dc7642bbf0081b7582f9 (patch)
tree06411011aa5655d73d809d873d2d80d17842e047 /drivers/net/wireless/ath/main.c
parent0ab82b04ac83a05bda3ef8499f415fc6fd6ee206 (diff)
downloadlinux-21a99f934949807dc0c9dc7642bbf0081b7582f9.tar.xz
ath: Add and use ath_printk and ath_<level>
Add ath_printk and ath_<level> similar to dev_printk and dev_<level> from device.h This allows a more gradual rename of ath_print to to ath_dbg or perhaps ath_debug. This basically removes debug.h leaving only an #define ath_printk ath_dbg there and moving all the ATH_DBG_<foo> enums to ath.h I do not think there's much purpose for struct ath_common * being passed to the ath_printk functions, but perhaps there might be. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/main.c')
-rw-r--r--drivers/net/wireless/ath/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
index 487193f1de1a..c325202fdc5f 100644
--- a/drivers/net/wireless/ath/main.c
+++ b/drivers/net/wireless/ath/main.c
@@ -56,3 +56,23 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
return skb;
}
EXPORT_SYMBOL(ath_rxbuf_alloc);
+
+int ath_printk(const char *level, struct ath_common *common,
+ const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int rtn;
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ rtn = printk("%sath: %pV", level, &vaf);
+
+ va_end(args);
+
+ return rtn;
+}
+EXPORT_SYMBOL(ath_printk);