diff options
Diffstat (limited to 'include/sound/core.h')
| -rw-r--r-- | include/sound/core.h | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 309cb9659a05..a61499c22b0b 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
| @@ -93,15 +93,6 @@ struct snd_device { | |||
| 93 | 93 | ||
| 94 | #define snd_device(n) list_entry(n, struct snd_device, list) | 94 | #define snd_device(n) list_entry(n, struct snd_device, list) |
| 95 | 95 | ||
| 96 | /* monitor files for graceful shutdown (hotplug) */ | ||
| 97 | |||
| 98 | struct snd_monitor_file { | ||
| 99 | struct file *file; | ||
| 100 | const struct file_operations *disconnected_f_op; | ||
| 101 | struct list_head shutdown_list; /* still need to shutdown */ | ||
| 102 | struct list_head list; /* link of monitor files */ | ||
| 103 | }; | ||
| 104 | |||
| 105 | /* main structure for soundcard */ | 96 | /* main structure for soundcard */ |
| 106 | 97 | ||
| 107 | struct snd_card { | 98 | struct snd_card { |
| @@ -311,9 +302,7 @@ int snd_component_add(struct snd_card *card, const char *component); | |||
| 311 | int snd_card_file_add(struct snd_card *card, struct file *file); | 302 | int snd_card_file_add(struct snd_card *card, struct file *file); |
| 312 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 303 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
| 313 | 304 | ||
| 314 | #ifndef snd_card_set_dev | ||
| 315 | #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) | 305 | #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) |
| 316 | #endif | ||
| 317 | 306 | ||
| 318 | /* device.c */ | 307 | /* device.c */ |
| 319 | 308 | ||
| @@ -340,18 +329,17 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); | |||
| 340 | struct resource; | 329 | struct resource; |
| 341 | void release_and_free_resource(struct resource *res); | 330 | void release_and_free_resource(struct resource *res); |
| 342 | 331 | ||
| 343 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
| 344 | void snd_verbose_printk(const char *file, int line, const char *format, ...) | ||
| 345 | __attribute__ ((format (printf, 3, 4))); | ||
| 346 | #endif | ||
| 347 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) | ||
| 348 | void snd_verbose_printd(const char *file, int line, const char *format, ...) | ||
| 349 | __attribute__ ((format (printf, 3, 4))); | ||
| 350 | #endif | ||
| 351 | |||
| 352 | /* --- */ | 332 | /* --- */ |
| 353 | 333 | ||
| 354 | #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 | |||
| 355 | /** | 343 | /** |
| 356 | * snd_printk - printk wrapper | 344 | * snd_printk - printk wrapper |
| 357 | * @fmt: format string | 345 | * @fmt: format string |
| @@ -360,15 +348,9 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
| 360 | * when configured with CONFIG_SND_VERBOSE_PRINTK. | 348 | * when configured with CONFIG_SND_VERBOSE_PRINTK. |
| 361 | */ | 349 | */ |
| 362 | #define snd_printk(fmt, args...) \ | 350 | #define snd_printk(fmt, args...) \ |
| 363 | snd_verbose_printk(__FILE__, __LINE__, fmt ,##args) | 351 | __snd_printk(0, __FILE__, __LINE__, fmt, ##args) |
| 364 | #else | ||
| 365 | #define snd_printk(fmt, args...) \ | ||
| 366 | printk(fmt ,##args) | ||
| 367 | #endif | ||
| 368 | 352 | ||
| 369 | #ifdef CONFIG_SND_DEBUG | 353 | #ifdef CONFIG_SND_DEBUG |
| 370 | |||
| 371 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
| 372 | /** | 354 | /** |
| 373 | * snd_printd - debug printk | 355 | * snd_printd - debug printk |
| 374 | * @fmt: format string | 356 | * @fmt: format string |
| @@ -377,11 +359,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
| 377 | * Ignored when CONFIG_SND_DEBUG is not set. | 359 | * Ignored when CONFIG_SND_DEBUG is not set. |
| 378 | */ | 360 | */ |
| 379 | #define snd_printd(fmt, args...) \ | 361 | #define snd_printd(fmt, args...) \ |
| 380 | snd_verbose_printd(__FILE__, __LINE__, fmt ,##args) | 362 | __snd_printk(1, __FILE__, __LINE__, fmt, ##args) |
| 381 | #else | ||
| 382 | #define snd_printd(fmt, args...) \ | ||
| 383 | printk(fmt ,##args) | ||
| 384 | #endif | ||
| 385 | 363 | ||
| 386 | /** | 364 | /** |
| 387 | * snd_BUG - give a BUG warning message and stack trace | 365 | * snd_BUG - give a BUG warning message and stack trace |
| @@ -428,9 +406,10 @@ static inline int __snd_bug_on(int cond) | |||
| 428 | * Works like snd_printk() for debugging purposes. | 406 | * Works like snd_printk() for debugging purposes. |
| 429 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. | 407 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. |
| 430 | */ | 408 | */ |
| 431 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 409 | #define snd_printdd(format, args...) \ |
| 410 | __snd_printk(2, __FILE__, __LINE__, format, ##args) | ||
| 432 | #else | 411 | #else |
| 433 | #define snd_printdd(format, args...) /* nothing */ | 412 | #define snd_printdd(format, args...) do { } while (0) |
| 434 | #endif | 413 | #endif |
| 435 | 414 | ||
| 436 | 415 | ||
| @@ -438,12 +417,10 @@ static inline int __snd_bug_on(int cond) | |||
| 438 | 417 | ||
| 439 | /* for easier backward-porting */ | 418 | /* for easier backward-porting */ |
| 440 | #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) | 419 | #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) |
| 441 | #ifndef gameport_set_dev_parent | ||
| 442 | #define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) | 420 | #define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) |
| 443 | #define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) | 421 | #define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) |
| 444 | #define gameport_get_port_data(gp) (gp)->port_data | 422 | #define gameport_get_port_data(gp) (gp)->port_data |
| 445 | #endif | 423 | #endif |
| 446 | #endif | ||
| 447 | 424 | ||
| 448 | /* PCI quirk list helper */ | 425 | /* PCI quirk list helper */ |
| 449 | struct snd_pci_quirk { | 426 | struct snd_pci_quirk { |
