aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-07 08:12:34 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-07 08:25:07 -0500
commit31584ed18c073176a7ad96ddbfd09765e21e813d (patch)
tree2ca3aa3a7d7762be55a3139a5e79eefc33e68be3 /sound/core
parent67e225009bb15403341d313f51326113c61af7df (diff)
ALSA: snd_ctl_activate_id(): Fix index look-up
We want to know the offset for the id that was passed to the function, not the offset of the first id of the control (which is always 0). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 99aa3aa157ba..bb96a467e88d 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -572,7 +572,7 @@ int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
572 ret = -ENOENT; 572 ret = -ENOENT;
573 goto unlock; 573 goto unlock;
574 } 574 }
575 index_offset = snd_ctl_get_ioff(kctl, &kctl->id); 575 index_offset = snd_ctl_get_ioff(kctl, id);
576 vd = &kctl->vd[index_offset]; 576 vd = &kctl->vd[index_offset];
577 ret = 0; 577 ret = 0;
578 if (active) { 578 if (active) {