diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/core.h | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index f545efcf03f2..a61499c22b0b 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -329,18 +329,17 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); | |||
329 | struct resource; | 329 | struct resource; |
330 | void release_and_free_resource(struct resource *res); | 330 | void release_and_free_resource(struct resource *res); |
331 | 331 | ||
332 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
333 | void snd_verbose_printk(const char *file, int line, const char *format, ...) | ||
334 | __attribute__ ((format (printf, 3, 4))); | ||
335 | #endif | ||
336 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) | ||
337 | void snd_verbose_printd(const char *file, int line, const char *format, ...) | ||
338 | __attribute__ ((format (printf, 3, 4))); | ||
339 | #endif | ||
340 | |||
341 | /* --- */ | 332 | /* --- */ |
342 | 333 | ||
343 | #ifdef CONFIG_SND_VERBOSE_PRINTK | 334 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) |
335 | void __snd_printk(unsigned int level, const char *file, int line, | ||
336 | const char *format, ...) | ||
337 | __attribute__ ((format (printf, 4, 5))); | ||
338 | #else | ||
339 | #define __snd_printk(level, file, line, format, args...) \ | ||
340 | printk(format, ##args) | ||
341 | #endif | ||
342 | |||
344 | /** | 343 | /** |
345 | * snd_printk - printk wrapper | 344 | * snd_printk - printk wrapper |
346 | * @fmt: format string | 345 | * @fmt: format string |
@@ -349,15 +348,9 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
349 | * when configured with CONFIG_SND_VERBOSE_PRINTK. | 348 | * when configured with CONFIG_SND_VERBOSE_PRINTK. |
350 | */ | 349 | */ |
351 | #define snd_printk(fmt, args...) \ | 350 | #define snd_printk(fmt, args...) \ |
352 | snd_verbose_printk(__FILE__, __LINE__, fmt ,##args) | 351 | __snd_printk(0, __FILE__, __LINE__, fmt, ##args) |
353 | #else | ||
354 | #define snd_printk(fmt, args...) \ | ||
355 | printk(fmt ,##args) | ||
356 | #endif | ||
357 | 352 | ||
358 | #ifdef CONFIG_SND_DEBUG | 353 | #ifdef CONFIG_SND_DEBUG |
359 | |||
360 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
361 | /** | 354 | /** |
362 | * snd_printd - debug printk | 355 | * snd_printd - debug printk |
363 | * @fmt: format string | 356 | * @fmt: format string |
@@ -366,11 +359,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
366 | * Ignored when CONFIG_SND_DEBUG is not set. | 359 | * Ignored when CONFIG_SND_DEBUG is not set. |
367 | */ | 360 | */ |
368 | #define snd_printd(fmt, args...) \ | 361 | #define snd_printd(fmt, args...) \ |
369 | snd_verbose_printd(__FILE__, __LINE__, fmt ,##args) | 362 | __snd_printk(1, __FILE__, __LINE__, fmt, ##args) |
370 | #else | ||
371 | #define snd_printd(fmt, args...) \ | ||
372 | printk(fmt ,##args) | ||
373 | #endif | ||
374 | 363 | ||
375 | /** | 364 | /** |
376 | * snd_BUG - give a BUG warning message and stack trace | 365 | * snd_BUG - give a BUG warning message and stack trace |
@@ -417,9 +406,10 @@ static inline int __snd_bug_on(int cond) | |||
417 | * Works like snd_printk() for debugging purposes. | 406 | * Works like snd_printk() for debugging purposes. |
418 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. | 407 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. |
419 | */ | 408 | */ |
420 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 409 | #define snd_printdd(format, args...) \ |
410 | __snd_printk(2, __FILE__, __LINE__, format, ##args) | ||
421 | #else | 411 | #else |
422 | #define snd_printdd(format, args...) /* nothing */ | 412 | #define snd_printdd(format, args...) do { } while (0) |
423 | #endif | 413 | #endif |
424 | 414 | ||
425 | 415 | ||