From: Mark Brown Date: Sun, 19 Jun 2011 12:49:28 +0000 (+0100) Subject: ASoC: Fix DAPM sequence run for per-widget I/O methods X-Git-Tag: v3.3-rc1~14^2~936 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29376bc7e2bbb745c9ad47e48ca706ac5a24897f;p=platform%2Fkernel%2Flinux-3.10.git ASoC: Fix DAPM sequence run for per-widget I/O methods Previously we were using the DAPM context rather than a widget as the argument for update_bits() so we didn't need to care that our list walk of widgets left us one beyond the end of the list. Now we're using them for the register update we need to make sure we're pointing at an actual widget not the list_head. Fix originally suggested by Liam on IM. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 605c225..ceb2ba4 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -918,6 +918,12 @@ static void dapm_seq_run_coalesced(struct snd_soc_dapm_context *dapm, } if (reg >= 0) { + /* Any widget will do, they should all be updating the + * same register. + */ + w = list_first_entry(pending, struct snd_soc_dapm_widget, + power_list); + pop_dbg(dapm->dev, card->pop_time, "pop test : Applying 0x%x/0x%x to %x in %dms\n", value, mask, reg, card->pop_time);