summaryrefslogtreecommitdiff
path: root/sound/core/sound_oss.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 15:13:43 +0400
committerTakashi Iwai <tiwai@suse.de>2014-02-14 11:14:13 +0400
commitf24640648186b59bd39f8cd640d631bdb61a3197 (patch)
treea73d73fd6d100ace77a0f67d7af3df367251d1bc /sound/core/sound_oss.c
parent34356dbdb64e9f12cc8ce1bb0d9e38a75b1e4638 (diff)
downloadlinux-f24640648186b59bd39f8cd640d631bdb61a3197.tar.xz
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_oss.c')
-rw-r--r--sound/core/sound_oss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index b19184d45f19..573a65eb2b79 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -55,7 +55,7 @@ void *snd_lookup_oss_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_oss_mutex);