From ecbcfe36fa882e9f8f2be63ac0c42978336bf997 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 5 Sep 2005 17:15:37 +0200 Subject: [ALSA] Introduce snd_card_set_generic_dev() ALSA Core A new function snd_card_set_generic_dev() is introduced to add the 'generic device' support for devices without proper bus on sysfs. It's a last resort, and should be removed in future when they have a proper bus, instead. Signed-off-by: Takashi Iwai --- include/sound/core.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/sound/core.h') diff --git a/include/sound/core.h b/include/sound/core.h index 3dc41fd5c54d..26160adcdffc 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -168,6 +168,9 @@ struct _snd_card { wait_queue_head_t shutdown_sleep; struct work_struct free_workq; /* for free in workqueue */ struct device *dev; +#ifdef CONFIG_SND_GENERIC_DRIVER + struct snd_generic_device *generic_dev; +#endif #ifdef CONFIG_PM int (*pm_suspend)(snd_card_t *card, pm_message_t state); @@ -176,9 +179,6 @@ struct _snd_card { unsigned int power_state; /* power state */ struct semaphore power_lock; /* power lock */ wait_queue_head_t power_sleep; -#ifdef CONFIG_SND_GENERIC_PM - struct snd_generic_device *pm_dev; /* for ISA */ -#endif #endif #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) @@ -348,6 +348,8 @@ int snd_card_file_remove(snd_card_t *card, struct file *file); #ifndef snd_card_set_dev #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) #endif +/* register a generic device (for ISA, etc) */ +int snd_card_set_generic_dev(snd_card_t *card); /* device.c */ -- cgit v1.2.1