]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/control.c
ALSA: use correct lock in snd_ctl_dev_disconnect()
[linux-2.6-omap-h63xx.git] / sound / core / control.c
index 3c5e746d619b76572327ea3b0a4fba849e1c6ed6..6d71f9a7ccbb9a063324d1bc381edc2e113f4e84 100644 (file)
@@ -1438,12 +1438,12 @@ static int snd_ctl_dev_disconnect(struct snd_device *device)
        if (snd_BUG_ON(cardnum < 0 || cardnum >= SNDRV_CARDS))
                return -ENXIO;
 
-       down_read(&card->controls_rwsem);
+       read_lock(&card->ctl_files_rwlock);
        list_for_each_entry(ctl, &card->ctl_files, list) {
                wake_up(&ctl->change_sleep);
                kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
        }
-       up_read(&card->controls_rwsem);
+       read_unlock(&card->ctl_files_rwlock);
 
        if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
                                         card, -1)) < 0)