summaryrefslogtreecommitdiff
path: root/sound/core/sound.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 12:13:43 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-14 08:14:13 +0100
commitf24640648186b59bd39f8cd640d631bdb61a3197 (patch)
treea73d73fd6d100ace77a0f67d7af3df367251d1bc /sound/core/sound.c
parent34356dbdb64e9f12cc8ce1bb0d9e38a75b1e4638 (diff)
ALSA: Use standard device refcount for card accounting
Drop the own refcount but use the standard device refcounting via get_device() and put_device(). Introduce a new completion to snd_card instead of the wait queue for syncing the last release, which is used in snd_card_free(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r--sound/core/sound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 437c25ea6403..4aaa53161644 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -118,7 +118,7 @@ void *snd_lookup_minor_data(unsigned int minor, int type)
if (mreg && mreg->type == type) {
private_data = mreg->private_data;
if (private_data && mreg->card_ptr)
- atomic_inc(&mreg->card_ptr->refcount);
+ get_device(&mreg->card_ptr->card_dev);
} else
private_data = NULL;
mutex_unlock(&sound_mutex);