Commit fdfc4f3e authored by Mark Brown's avatar Mark Brown

ASoC: wm8994: Use regmap directly for wm8994_mic_work

Make it clearer what context we're operating in.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e9b54de4
...@@ -3064,18 +3064,20 @@ static void wm8994_mic_work(struct work_struct *work) ...@@ -3064,18 +3064,20 @@ static void wm8994_mic_work(struct work_struct *work)
struct wm8994_priv *priv = container_of(work, struct wm8994_priv *priv = container_of(work,
struct wm8994_priv, struct wm8994_priv,
mic_work.work); mic_work.work);
struct snd_soc_codec *codec = priv->codec; struct regmap *regmap = priv->wm8994->regmap;
int reg; struct device *dev = priv->wm8994->dev;
unsigned int reg;
int ret;
int report; int report;
reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2); ret = regmap_read(regmap, WM8994_INTERRUPT_RAW_STATUS_2, &reg);
if (reg < 0) { if (ret < 0) {
dev_err(codec->dev, "Failed to read microphone status: %d\n", dev_err(dev, "Failed to read microphone status: %d\n",
reg); ret);
return; return;
} }
dev_dbg(codec->dev, "Microphone status: %x\n", reg); dev_dbg(dev, "Microphone status: %x\n", reg);
report = 0; report = 0;
if (reg & WM8994_MIC1_DET_STS) { if (reg & WM8994_MIC1_DET_STS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment