diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:24:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:24:04 -0500 |
commit | 6026179519896e7d35b2564e7544487d1c8948e7 (patch) | |
tree | c78c7032abce24d846423572204f1cd4e97d8efc /sound/core/hwdep.c | |
parent | d27146dd5b72ab7d7e641f56f4bee1484dabd0b7 (diff) | |
parent | c2902c8ae06762d941fab64198467f78cab6f8cd (diff) |
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (212 commits)
[PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED
[ALSA] version 1.0.14rc2
[ALSA] ASoC documentation updates
[ALSA] ca0106 - Add missing sysfs device assignment
[ALSA] aoa i2sbus: Stop Apple i2s DMA gracefully
[ALSA] hda-codec - Add support for Fujitsu PI1556 Realtek ALC880
[ALSA] aoa: remove suspend/resume printks
[ALSA] Fix possible deadlocks in sequencer at removal of ports
[ALSA] emu10k1 - Fix STAC9758 front channel
[ALSA] soc - Clean up with kmemdup()
[ALSA] snd-ak4114: Fix two array overflows
[ALSA] ac97_bus power management
[ALSA] usbaudio - Add support for Edirol UA-101
[ALSA] hda-codec - Add ALC861VD/ALC660VD support
[ALSA] soc - ASoC 0.13 Sharp poodle machine
[ALSA] soc - ASoC 0.13 Sharp tosa machine
[ALSA] soc - ASoC 0.13 spitz machine
[ALSA] soc - ASoC Sharp corgi machine
[ALSA] soc - ASoC 0.13 pxa2xx DMA
[ALSA] soc - ASoC 0.13 pxa2xx AC97 driver
...
Diffstat (limited to 'sound/core/hwdep.c')
-rw-r--r-- | sound/core/hwdep.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index 46b47689362c..39c03f3dfbfa 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c | |||
@@ -47,14 +47,11 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device); | |||
47 | 47 | ||
48 | static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device) | 48 | static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device) |
49 | { | 49 | { |
50 | struct list_head *p; | ||
51 | struct snd_hwdep *hwdep; | 50 | struct snd_hwdep *hwdep; |
52 | 51 | ||
53 | list_for_each(p, &snd_hwdep_devices) { | 52 | list_for_each_entry(hwdep, &snd_hwdep_devices, list) |
54 | hwdep = list_entry(p, struct snd_hwdep, list); | ||
55 | if (hwdep->card == card && hwdep->device == device) | 53 | if (hwdep->card == card && hwdep->device == device) |
56 | return hwdep; | 54 | return hwdep; |
57 | } | ||
58 | return NULL; | 55 | return NULL; |
59 | } | 56 | } |
60 | 57 | ||
@@ -159,15 +156,16 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) | |||
159 | int err = -ENXIO; | 156 | int err = -ENXIO; |
160 | struct snd_hwdep *hw = file->private_data; | 157 | struct snd_hwdep *hw = file->private_data; |
161 | struct module *mod = hw->card->module; | 158 | struct module *mod = hw->card->module; |
159 | |||
162 | mutex_lock(&hw->open_mutex); | 160 | mutex_lock(&hw->open_mutex); |
163 | if (hw->ops.release) { | 161 | if (hw->ops.release) |
164 | err = hw->ops.release(hw, file); | 162 | err = hw->ops.release(hw, file); |
165 | wake_up(&hw->open_wait); | ||
166 | } | ||
167 | if (hw->used > 0) | 163 | if (hw->used > 0) |
168 | hw->used--; | 164 | hw->used--; |
169 | snd_card_file_remove(hw->card, file); | ||
170 | mutex_unlock(&hw->open_mutex); | 165 | mutex_unlock(&hw->open_mutex); |
166 | wake_up(&hw->open_wait); | ||
167 | |||
168 | snd_card_file_remove(hw->card, file); | ||
171 | module_put(mod); | 169 | module_put(mod); |
172 | return err; | 170 | return err; |
173 | } | 171 | } |
@@ -468,15 +466,12 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device) | |||
468 | static void snd_hwdep_proc_read(struct snd_info_entry *entry, | 466 | static void snd_hwdep_proc_read(struct snd_info_entry *entry, |
469 | struct snd_info_buffer *buffer) | 467 | struct snd_info_buffer *buffer) |
470 | { | 468 | { |
471 | struct list_head *p; | ||
472 | struct snd_hwdep *hwdep; | 469 | struct snd_hwdep *hwdep; |
473 | 470 | ||
474 | mutex_lock(®ister_mutex); | 471 | mutex_lock(®ister_mutex); |
475 | list_for_each(p, &snd_hwdep_devices) { | 472 | list_for_each_entry(hwdep, &snd_hwdep_devices, list) |
476 | hwdep = list_entry(p, struct snd_hwdep, list); | ||
477 | snd_iprintf(buffer, "%02i-%02i: %s\n", | 473 | snd_iprintf(buffer, "%02i-%02i: %s\n", |
478 | hwdep->card->number, hwdep->device, hwdep->name); | 474 | hwdep->card->number, hwdep->device, hwdep->name); |
479 | } | ||
480 | mutex_unlock(®ister_mutex); | 475 | mutex_unlock(®ister_mutex); |
481 | } | 476 | } |
482 | 477 | ||