stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ASoC: dapm: Fix ctl value accesses in a wrong type" has been added to the 4.4-stable tree
@ 2016-03-12  7:04 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-03-12  7:04 UTC (permalink / raw)
  To: tiwai, broonie, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ASoC: dapm: Fix ctl value accesses in a wrong type

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-dapm-fix-ctl-value-accesses-in-a-wrong-type.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 741338f99f16dc24d2d01ac777b0798ae9d10a90 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 17:20:48 +0100
Subject: ASoC: dapm: Fix ctl value accesses in a wrong type

From: Takashi Iwai <tiwai@suse.de>

commit 741338f99f16dc24d2d01ac777b0798ae9d10a90 upstream.

snd_soc_dapm_dai_link_get() and _put() access the associated ctl
values as value.integer.value[].  However, this is an enum ctl, and it
has to be accessed via value.enumerated.item[].  The former is long
while the latter is unsigned int, so they don't align.

Fixes: c66150824b8a ('ASoC: dapm: add code to configure dai link parameters')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/soc/soc-dapm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3568,7 +3568,7 @@ static int snd_soc_dapm_dai_link_get(str
 {
 	struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol);
 
-	ucontrol->value.integer.value[0] = w->params_select;
+	ucontrol->value.enumerated.item[0] = w->params_select;
 
 	return 0;
 }
@@ -3582,13 +3582,13 @@ static int snd_soc_dapm_dai_link_put(str
 	if (w->power)
 		return -EBUSY;
 
-	if (ucontrol->value.integer.value[0] == w->params_select)
+	if (ucontrol->value.enumerated.item[0] == w->params_select)
 		return 0;
 
-	if (ucontrol->value.integer.value[0] >= w->num_params)
+	if (ucontrol->value.enumerated.item[0] >= w->num_params)
 		return -EINVAL;
 
-	w->params_select = ucontrol->value.integer.value[0];
+	w->params_select = ucontrol->value.enumerated.item[0];
 
 	return 0;
 }


Patches currently in stable-queue which might be from tiwai@suse.de are

queue-4.4/asoc-wm8958-fix-enum-ctl-accesses-in-a-wrong-type.patch
queue-4.4/asoc-dapm-fix-ctl-value-accesses-in-a-wrong-type.patch
queue-4.4/asoc-wm8994-fix-enum-ctl-accesses-in-a-wrong-type.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-12  7:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12  7:04 Patch "ASoC: dapm: Fix ctl value accesses in a wrong type" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).