diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 14:24:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 14:32:44 -0400 |
commit | fdfc4f3eb796896133a4dbcb1c1f94ff02274649 (patch) | |
tree | 4ff0de9aea2e11d5dfd2700c437cd0ea50ccf357 /sound/soc/codecs | |
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/soc/codecs')
-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 54512880e191..50003b337722 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) | |||
3064 | struct wm8994_priv *priv = container_of(work, | 3064 | struct wm8994_priv *priv = container_of(work, |
3065 | struct wm8994_priv, | 3065 | struct wm8994_priv, |
3066 | mic_work.work); | 3066 | mic_work.work); |
3067 | struct snd_soc_codec *codec = priv->codec; | 3067 | struct regmap *regmap = priv->wm8994->regmap; |
3068 | int reg; | 3068 | struct device *dev = priv->wm8994->dev; |
3069 | unsigned int reg; | ||
3070 | int ret; | ||
3069 | int report; | 3071 | int report; |
3070 | 3072 | ||
3071 | reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2); | 3073 | ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, ®); |
3072 | if (reg < 0) { | 3074 | if (ret < 0) { |
3073 | dev_err(codec->dev, "Failed to read microphone status: %d\n", | 3075 | dev_err(dev, "Failed to read microphone status: %d\n", |
3074 | reg); | 3076 | ret); |
3075 | return; | 3077 | return; |
3076 | } | 3078 | } |
3077 | 3079 | ||
3078 | dev_dbg(codec->dev, "Microphone status: %x\n", reg); | 3080 | dev_dbg(dev, "Microphone status: %x\n", reg); |
3079 | 3081 | ||
3080 | report = 0; | 3082 | report = 0; |
3081 | if (reg & WM8994_MIC1_DET_STS) { | 3083 | if (reg & WM8994_MIC1_DET_STS) { |