ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
commita28f077aa8b13983837eaad2a3897891b9d511be
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 9 Jun 2011 11:22:36 +0000 (9 13:22 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:39 +0000 (23 15:05 -0700)
treee12c623750ec611c2eedfb4af2f599219a849380
parentea0fd1f2712b03caa2f7a55ea7ff2fb062d43996
ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context

commit 4b80b8c2eee5282dab57f094fd3893c0c09f750c upstream.

Currently it is possible that snd_soc_new_{mixer,mux,pga} is called with a
DAPM context not matching the widgets context. This can lead to a wrong
prefix_len calculation, which will result in undefined behaviour. To avoid
this always use the DAPM context from the widget itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/soc-dapm.c