From 3b1ca0dc7d4785be222f8a2cffd010fd2d1350e6 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 19 Apr 2011 15:25:11 -0600 Subject: [PATCH] --- yaml --- r: 248305 b: refs/heads/master c: a68b38ada57bc9aeeec574d3e76e67ad89fea303 h: refs/heads/master i: 248303: cac388cc3593d4c95037b9a0c7a1da9622e1dff5 v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-dapm.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d88ab043812d..defbd194a1e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a32955dba2e2629bddacf7c1b9de3bf1b7c56acf +refs/heads/master: a68b38ada57bc9aeeec574d3e76e67ad89fea303 diff --git a/trunk/sound/soc/soc-dapm.c b/trunk/sound/soc/soc-dapm.c index 2ee738c08ca4..4c868f9087f4 100644 --- a/trunk/sound/soc/soc-dapm.c +++ b/trunk/sound/soc/soc-dapm.c @@ -2403,6 +2403,12 @@ int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm, return w->connected; } + /* Try again in other contexts */ + list_for_each_entry(w, &dapm->card->widgets, list) { + if (!strcmp(w->name, pin)) + return w->connected; + } + return 0; } EXPORT_SYMBOL_GPL(snd_soc_dapm_get_pin_status);