aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-26 08:12:42 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-26 08:12:42 -0500
commite7dd8c1bdacf658b0ade51facb2f7eaf40eb0ac4 (patch)
tree0db15820fdd391a1570e1257167e8f02532c83f5 /include/sound
parented313489badef16d700f5a3be50e8fd8f8294bc8 (diff)
parentbc4a68fed4b4c01005ef3c71ede6a8cbe91b7dc9 (diff)
Merge branch 'topic/misc' into topic/pcsp-fix
Conflicts: sound/drivers/pcsp/pcsp_lib.c
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/core.h28
-rw-r--r--include/sound/version.h2
2 files changed, 26 insertions, 4 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 1508c4ec1ba9..f632484bc743 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -353,7 +353,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
353 * snd_printk - printk wrapper 353 * snd_printk - printk wrapper
354 * @fmt: format string 354 * @fmt: format string
355 * 355 *
356 * Works like print() but prints the file and the line of the caller 356 * Works like printk() but prints the file and the line of the caller
357 * when configured with CONFIG_SND_VERBOSE_PRINTK. 357 * when configured with CONFIG_SND_VERBOSE_PRINTK.
358 */ 358 */
359#define snd_printk(fmt, args...) \ 359#define snd_printk(fmt, args...) \
@@ -380,18 +380,40 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
380 printk(fmt ,##args) 380 printk(fmt ,##args)
381#endif 381#endif
382 382
383/**
384 * snd_BUG - give a BUG warning message and stack trace
385 *
386 * Calls WARN() if CONFIG_SND_DEBUG is set.
387 * Ignored when CONFIG_SND_DEBUG is not set.
388 */
383#define snd_BUG() WARN(1, "BUG?\n") 389#define snd_BUG() WARN(1, "BUG?\n")
390
391/**
392 * snd_BUG_ON - debugging check macro
393 * @cond: condition to evaluate
394 *
395 * When CONFIG_SND_DEBUG is set, this macro evaluates the given condition,
396 * and call WARN() and returns the value if it's non-zero.
397 *
398 * When CONFIG_SND_DEBUG is not set, this just returns zero, and the given
399 * condition is ignored.
400 *
401 * NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n.
402 * Thus, don't put any statement that influences on the code behavior,
403 * such as pre/post increment, to the argument of this macro.
404 * If you want to evaluate and give a warning, use standard WARN_ON().
405 */
384#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) 406#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
385 407
386#else /* !CONFIG_SND_DEBUG */ 408#else /* !CONFIG_SND_DEBUG */
387 409
388#define snd_printd(fmt, args...) do { } while (0) 410#define snd_printd(fmt, args...) do { } while (0)
389#define snd_BUG() do { } while (0) 411#define snd_BUG() do { } while (0)
390static inline int __snd_bug_on(void) 412static inline int __snd_bug_on(int cond)
391{ 413{
392 return 0; 414 return 0;
393} 415}
394#define snd_BUG_ON(cond) __snd_bug_on() /* always false */ 416#define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */
395 417
396#endif /* CONFIG_SND_DEBUG */ 418#endif /* CONFIG_SND_DEBUG */
397 419
diff --git a/include/sound/version.h b/include/sound/version.h
index 4aafeda88634..2b48237e23bf 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h */ 1/* include/version.h */
2#define CONFIG_SND_VERSION "1.0.18rc3" 2#define CONFIG_SND_VERSION "1.0.18a"
3#define CONFIG_SND_DATE "" 3#define CONFIG_SND_DATE ""