diff options
Diffstat (limited to 'include/sound/core.h')
-rw-r--r-- | include/sound/core.h | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 558b96284bd2..35424a971b7a 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/rwsem.h> /* struct rw_semaphore */ | 28 | #include <linux/rwsem.h> /* struct rw_semaphore */ |
29 | #include <linux/pm.h> /* pm_message_t */ | 29 | #include <linux/pm.h> /* pm_message_t */ |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/stringify.h> | ||
31 | 32 | ||
32 | /* number of supported soundcards */ | 33 | /* number of supported soundcards */ |
33 | #ifdef CONFIG_SND_DYNAMIC_MINORS | 34 | #ifdef CONFIG_SND_DYNAMIC_MINORS |
@@ -42,9 +43,6 @@ | |||
42 | #ifdef CONFIG_PCI | 43 | #ifdef CONFIG_PCI |
43 | struct pci_dev; | 44 | struct pci_dev; |
44 | #endif | 45 | #endif |
45 | #ifdef CONFIG_SBUS | ||
46 | struct sbus_dev; | ||
47 | #endif | ||
48 | 46 | ||
49 | /* device allocation stuff */ | 47 | /* device allocation stuff */ |
50 | 48 | ||
@@ -63,6 +61,7 @@ typedef int __bitwise snd_device_type_t; | |||
63 | #define SNDRV_DEV_INFO ((__force snd_device_type_t) 0x1006) | 61 | #define SNDRV_DEV_INFO ((__force snd_device_type_t) 0x1006) |
64 | #define SNDRV_DEV_BUS ((__force snd_device_type_t) 0x1007) | 62 | #define SNDRV_DEV_BUS ((__force snd_device_type_t) 0x1007) |
65 | #define SNDRV_DEV_CODEC ((__force snd_device_type_t) 0x1008) | 63 | #define SNDRV_DEV_CODEC ((__force snd_device_type_t) 0x1008) |
64 | #define SNDRV_DEV_JACK ((__force snd_device_type_t) 0x1009) | ||
66 | #define SNDRV_DEV_LOWLEVEL ((__force snd_device_type_t) 0x2000) | 65 | #define SNDRV_DEV_LOWLEVEL ((__force snd_device_type_t) 0x2000) |
67 | 66 | ||
68 | typedef int __bitwise snd_device_state_t; | 67 | typedef int __bitwise snd_device_state_t; |
@@ -114,7 +113,7 @@ struct snd_card { | |||
114 | char shortname[32]; /* short name of this soundcard */ | 113 | char shortname[32]; /* short name of this soundcard */ |
115 | char longname[80]; /* name of this soundcard */ | 114 | char longname[80]; /* name of this soundcard */ |
116 | char mixername[80]; /* mixer name */ | 115 | char mixername[80]; /* mixer name */ |
117 | char components[80]; /* card components delimited with | 116 | char components[128]; /* card components delimited with |
118 | space */ | 117 | space */ |
119 | struct module *module; /* top-level module */ | 118 | struct module *module; /* top-level module */ |
120 | 119 | ||
@@ -366,8 +365,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
366 | 365 | ||
367 | #ifdef CONFIG_SND_DEBUG | 366 | #ifdef CONFIG_SND_DEBUG |
368 | 367 | ||
369 | #define __ASTRING__(x) #x | ||
370 | |||
371 | #ifdef CONFIG_SND_VERBOSE_PRINTK | 368 | #ifdef CONFIG_SND_VERBOSE_PRINTK |
372 | /** | 369 | /** |
373 | * snd_printd - debug printk | 370 | * snd_printd - debug printk |
@@ -382,33 +379,15 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
382 | #define snd_printd(fmt, args...) \ | 379 | #define snd_printd(fmt, args...) \ |
383 | printk(fmt ,##args) | 380 | printk(fmt ,##args) |
384 | #endif | 381 | #endif |
385 | /** | 382 | |
386 | * snd_assert - run-time assertion macro | 383 | #define snd_BUG() WARN(1, "BUG?\n") |
387 | * @expr: expression | 384 | #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) |
388 | * | ||
389 | * This macro checks the expression in run-time and invokes the commands | ||
390 | * given in the rest arguments if the assertion is failed. | ||
391 | * When CONFIG_SND_DEBUG is not set, the expression is executed but | ||
392 | * not checked. | ||
393 | */ | ||
394 | #define snd_assert(expr, args...) do { \ | ||
395 | if (unlikely(!(expr))) { \ | ||
396 | snd_printk(KERN_ERR "BUG? (%s)\n", __ASTRING__(expr)); \ | ||
397 | dump_stack(); \ | ||
398 | args; \ | ||
399 | } \ | ||
400 | } while (0) | ||
401 | |||
402 | #define snd_BUG() do { \ | ||
403 | snd_printk(KERN_ERR "BUG?\n"); \ | ||
404 | dump_stack(); \ | ||
405 | } while (0) | ||
406 | 385 | ||
407 | #else /* !CONFIG_SND_DEBUG */ | 386 | #else /* !CONFIG_SND_DEBUG */ |
408 | 387 | ||
409 | #define snd_printd(fmt, args...) /* nothing */ | 388 | #define snd_printd(fmt, args...) /* nothing */ |
410 | #define snd_assert(expr, args...) (void)(expr) | ||
411 | #define snd_BUG() /* nothing */ | 389 | #define snd_BUG() /* nothing */ |
390 | #define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */ | ||
412 | 391 | ||
413 | #endif /* CONFIG_SND_DEBUG */ | 392 | #endif /* CONFIG_SND_DEBUG */ |
414 | 393 | ||