diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-06 15:45:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:02:12 -0400 |
commit | 46eb5a13b7f397b37bac14fbfa240cffa463783c (patch) | |
tree | 098f86e1e2206e2427ae4737fb019362f1068b48 /drivers/staging/sep/sep_driver_config.h | |
parent | 794f1d789520d423ef6d90d5390edea5c1b687c2 (diff) |
Staging: sep: do something about all the printk macros
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep/sep_driver_config.h')
-rw-r--r-- | drivers/staging/sep/sep_driver_config.h | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/drivers/staging/sep/sep_driver_config.h b/drivers/staging/sep/sep_driver_config.h index 8a4d27a435e..f6d7ab6b881 100644 --- a/drivers/staging/sep/sep_driver_config.h +++ b/drivers/staging/sep/sep_driver_config.h | |||
@@ -199,50 +199,26 @@ | |||
199 | 199 | ||
200 | /* the token that defines the start of time address */ | 200 | /* the token that defines the start of time address */ |
201 | #define SEP_TIME_VAL_TOKEN 0x12345678 | 201 | #define SEP_TIME_VAL_TOKEN 0x12345678 |
202 | |||
202 | /* DEBUG LEVEL MASKS */ | 203 | /* DEBUG LEVEL MASKS */ |
203 | #define SEP_DEBUG_LEVEL_BASIC 0x1 | 204 | #define SEP_DEBUG_LEVEL_BASIC 0x1 |
204 | 205 | ||
205 | #define SEP_DEBUG_LEVEL_REGISTERS 0x2 | ||
206 | |||
207 | #define SEP_DEBUG_LEVEL_EXTENDED 0x4 | 206 | #define SEP_DEBUG_LEVEL_EXTENDED 0x4 |
208 | 207 | ||
209 | 208 | ||
210 | /* FUNCTIONAL MACROS */ | 209 | /* Debug helpers */ |
211 | 210 | ||
212 | /* debug macro without paramaters */ | 211 | #define dbg(fmt, args...) \ |
213 | #define DEBUG_PRINT_0(DEBUG_LEVEL , info) \ | 212 | do {\ |
214 | do { \ | 213 | if (sepDebug & SEP_DEBUG_LEVEL_BASIC) \ |
215 | if (DEBUG_LEVEL & sepDebug) \ | 214 | printk(KERN_DEBUG fmt, ##args); \ |
216 | printk(KERN_WARNING info); \ | 215 | } while(0); |
217 | } while (0) | ||
218 | |||
219 | /* debug macro with 1 paramater */ | ||
220 | #define DEBUG_PRINT_1(DEBUG_LEVEL , info , param1) \ | ||
221 | do { \ | ||
222 | if (DEBUG_LEVEL & sepDebug) \ | ||
223 | printk(KERN_WARNING info, param1); \ | ||
224 | } while (0) | ||
225 | |||
226 | /* debug macro with 2 paramaters */ | ||
227 | #define DEBUG_PRINT_2(DEBUG_LEVEL, info, param1, param2) \ | ||
228 | do { \ | ||
229 | if (DEBUG_LEVEL & sepDebug) \ | ||
230 | printk(KERN_WARNING info , param1, param2); \ | ||
231 | } while (0) | ||
232 | |||
233 | /* debug macro with 3 paramaters */ | ||
234 | #define DEBUG_PRINT_3(DEBUG_LEVEL, info, param1, param2, param3) \ | ||
235 | do { \ | ||
236 | if (DEBUG_LEVEL & sepDebug) \ | ||
237 | printk(KERN_WARNING info , param1, param2 , param3); \ | ||
238 | } while (0) | ||
239 | 216 | ||
240 | /* debug macro with 4 paramaters */ | 217 | #define edbg(fmt, args...) \ |
241 | #define DEBUG_PRINT_4(DEBUG_LEVEL, info, param1, param2, param3, param4) \ | ||
242 | do { \ | 218 | do { \ |
243 | if (DEBUG_LEVEL & sepDebug) \ | 219 | if (sepDebug & SEP_DEBUG_LEVEL_EXTENDED) \ |
244 | printk(KERN_WARNING info, param1, param2, param3, param4); \ | 220 | printk(KERN_DEBUG fmt, ##args); \ |
245 | } while (0) | 221 | } while(0); |
246 | 222 | ||
247 | 223 | ||
248 | 224 | ||