[patch 59/86] ASoC: wm8994: Enabling VMID should take a runtime PM reference

From: Greg KH
Date: Fri Feb 10 2012 - 18:11:31 EST


3.2-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

commit db966f8abb9ba74f7d5a7230f51572f52c31c4e5 upstream.

We can enable VMID independently of the bias in some use cases so we need
to ensure that the core device is powered up.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
sound/soc/codecs/wm8994.c | 4 ++++
1 file changed, 4 insertions(+)

--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -729,6 +729,8 @@ static void vmid_reference(struct snd_so
{
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);

+ pm_runtime_get_sync(codec->dev);
+
wm8994->vmid_refcount++;

dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n",
@@ -796,6 +798,8 @@ static void vmid_dereference(struct snd_
WM8994_VMID_BUF_ENA |
WM8994_VMID_RAMP_MASK, 0);
}
+
+ pm_runtime_put(codec->dev);
}

static int vmid_event(struct snd_soc_dapm_widget *w,


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/