From f7476772347acba2e6c264e4ccf949055974f940 Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Wed, 29 Aug 2018 10:38:18 +0530 Subject: [PATCH] asoc: wcd937x: fix compilation issue in mbhc Fix compilation issue in wcd937x mbhc file. Change-Id: I49057cdf108268f60795f568cc7efb43d53d01a3 Signed-off-by: Ramprasad Katkam --- asoc/codecs/wcd937x/wcd937x-mbhc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/wcd937x/wcd937x-mbhc.c b/asoc/codecs/wcd937x/wcd937x-mbhc.c index f83271b083..d238019539 100644 --- a/asoc/codecs/wcd937x/wcd937x-mbhc.c +++ b/asoc/codecs/wcd937x/wcd937x-mbhc.c @@ -757,7 +757,7 @@ static bool wcd937x_mbhc_get_moisture_status(struct wcd_mbhc *mbhc) /* If moisture_en is already enabled, then skip to plug type * detection. */ - if ((snd_soc_update_bits(codec, WCD937X_MBHC_NEW_CTL_2) & 0x0C)) + if ((snd_soc_read(codec, WCD937X_MBHC_NEW_CTL_2) & 0x0C)) goto done; wcd937x_mbhc_moisture_detect_en(mbhc, true); @@ -773,6 +773,8 @@ done: static void wcd937x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc, bool enable) { + struct snd_soc_codec *codec = mbhc->codec; + snd_soc_update_bits(codec, WCD937X_MBHC_NEW_INT_MOISTURE_DET_POLLING_CTRL, 0x04, (enable << 2));