diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 19:24:39 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 19:32:44 +0100 |
commit | fdfc4f3eb796896133a4dbcb1c1f94ff02274649 (patch) | |
tree | 4ff0de9aea2e11d5dfd2700c437cd0ea50ccf357 /sound | |
parent | e9b54de420bfdd335d66c90b4d68e894677db668 (diff) |
ASoC: wm8994: Use regmap directly for wm8994_mic_work
Make it clearer what context we're operating in.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 54512880e19..50003b33772 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3064,18 +3064,20 @@ static void wm8994_mic_work(struct work_struct *work) struct wm8994_priv *priv = container_of(work, struct wm8994_priv, mic_work.work); - struct snd_soc_codec *codec = priv->codec; - int reg; + struct regmap *regmap = priv->wm8994->regmap; + struct device *dev = priv->wm8994->dev; + unsigned int reg; + int ret; int report; - reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2); - if (reg < 0) { - dev_err(codec->dev, "Failed to read microphone status: %d\n", - reg); + ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, ®); + if (ret < 0) { + dev_err(dev, "Failed to read microphone status: %d\n", + ret); return; } - dev_dbg(codec->dev, "Microphone status: %x\n", reg); + dev_dbg(dev, "Microphone status: %x\n", reg); report = 0; if (reg & WM8994_MIC1_DET_STS) { |