From: Takashi Iwai Subject: Re: [PATCH] ALSA: snd_ctl_activate_id(): Fix index look-up Date: Fri, 07 Nov 2014 14:30:23 +0100 Message-ID: References: <1415365954-15019-1-git-send-email-lars@metafoo.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 34969261299 for ; Fri, 7 Nov 2014 14:30:24 +0100 (CET) In-Reply-To: <1415365954-15019-1-git-send-email-lars@metafoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Lars-Peter Clausen Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 7 Nov 2014 14:12:34 +0100, Lars-Peter Clausen wrote: > > 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 > --- > The function seems currently unused, so no need to add this for stable Thanks, applied. (As I'd like to reduce the amounts post rc4, I put this to for-next branch, so it'll be merged in 3.19.) Takashi > --- > sound/core/control.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/core/control.c b/sound/core/control.c > index 99aa3aa..bb96a46 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, > ret = -ENOENT; > goto unlock; > } > - index_offset = snd_ctl_get_ioff(kctl, &kctl->id); > + index_offset = snd_ctl_get_ioff(kctl, id); > vd = &kctl->vd[index_offset]; > ret = 0; > if (active) { > -- > 1.8.0 >