diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-03-18 07:42:21 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-03-18 07:42:21 -0400 |
commit | d470b4bcc18a8209972f85a257631e96c3cad3a4 (patch) | |
tree | addaf761563de07ca17e2ddf9e372314a91dd516 /drivers/net/wireless/ath | |
parent | 4771979aab5ef964ef12803793fbb7884829944d (diff) |
ath6kl: convert ath6kl_info/err/warn macros to real functions
After this it's cleaner to add trace calls.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 51 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.h | 10 |
2 files changed, 54 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 15cfe30e54fd..2e248fac8523 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c | |||
@@ -56,6 +56,57 @@ int ath6kl_printk(const char *level, const char *fmt, ...) | |||
56 | } | 56 | } |
57 | EXPORT_SYMBOL(ath6kl_printk); | 57 | EXPORT_SYMBOL(ath6kl_printk); |
58 | 58 | ||
59 | int ath6kl_info(const char *fmt, ...) | ||
60 | { | ||
61 | struct va_format vaf = { | ||
62 | .fmt = fmt, | ||
63 | }; | ||
64 | va_list args; | ||
65 | int ret; | ||
66 | |||
67 | va_start(args, fmt); | ||
68 | vaf.va = &args; | ||
69 | ret = ath6kl_printk(KERN_INFO, "%pV", &vaf); | ||
70 | va_end(args); | ||
71 | |||
72 | return ret; | ||
73 | } | ||
74 | EXPORT_SYMBOL(ath6kl_info); | ||
75 | |||
76 | int ath6kl_err(const char *fmt, ...) | ||
77 | { | ||
78 | struct va_format vaf = { | ||
79 | .fmt = fmt, | ||
80 | }; | ||
81 | va_list args; | ||
82 | int ret; | ||
83 | |||
84 | va_start(args, fmt); | ||
85 | vaf.va = &args; | ||
86 | ret = ath6kl_printk(KERN_ERR, "%pV", &vaf); | ||
87 | va_end(args); | ||
88 | |||
89 | return ret; | ||
90 | } | ||
91 | EXPORT_SYMBOL(ath6kl_err); | ||
92 | |||
93 | int ath6kl_warn(const char *fmt, ...) | ||
94 | { | ||
95 | struct va_format vaf = { | ||
96 | .fmt = fmt, | ||
97 | }; | ||
98 | va_list args; | ||
99 | int ret; | ||
100 | |||
101 | va_start(args, fmt); | ||
102 | vaf.va = &args; | ||
103 | ret = ath6kl_printk(KERN_WARNING, "%pV", &vaf); | ||
104 | va_end(args); | ||
105 | |||
106 | return ret; | ||
107 | } | ||
108 | EXPORT_SYMBOL(ath6kl_warn); | ||
109 | |||
59 | #ifdef CONFIG_ATH6KL_DEBUG | 110 | #ifdef CONFIG_ATH6KL_DEBUG |
60 | 111 | ||
61 | void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...) | 112 | void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...) |
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h index f97cd4ead543..c6ca781900da 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.h +++ b/drivers/net/wireless/ath/ath6kl/debug.h | |||
@@ -51,13 +51,9 @@ enum ATH6K_DEBUG_MASK { | |||
51 | extern unsigned int debug_mask; | 51 | extern unsigned int debug_mask; |
52 | extern __printf(2, 3) | 52 | extern __printf(2, 3) |
53 | int ath6kl_printk(const char *level, const char *fmt, ...); | 53 | int ath6kl_printk(const char *level, const char *fmt, ...); |
54 | 54 | extern __printf(1, 2) int ath6kl_info(const char *fmt, ...); | |
55 | #define ath6kl_info(fmt, ...) \ | 55 | extern __printf(1, 2) int ath6kl_err(const char *fmt, ...); |
56 | ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__) | 56 | extern __printf(1, 2) int ath6kl_warn(const char *fmt, ...); |
57 | #define ath6kl_err(fmt, ...) \ | ||
58 | ath6kl_printk(KERN_ERR, fmt, ##__VA_ARGS__) | ||
59 | #define ath6kl_warn(fmt, ...) \ | ||
60 | ath6kl_printk(KERN_WARNING, fmt, ##__VA_ARGS__) | ||
61 | 57 | ||
62 | enum ath6kl_war { | 58 | enum ath6kl_war { |
63 | ATH6KL_WAR_INVALID_RATE, | 59 | ATH6KL_WAR_INVALID_RATE, |