aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8903.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index d663c97785d7..60ad8cdc046c 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1936,11 +1936,11 @@ static int wm8903_probe(struct snd_soc_codec *codec)
1936 bool mic_gpio = false; 1936 bool mic_gpio = false;
1937 1937
1938 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) { 1938 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) {
1939 if (pdata->gpio_cfg[i] == WM8903_GPIO_NO_CONFIG) 1939 if (pdata->gpio_cfg[i] > 0x7fff)
1940 continue; 1940 continue;
1941 1941
1942 snd_soc_write(codec, WM8903_GPIO_CONTROL_1 + i, 1942 snd_soc_write(codec, WM8903_GPIO_CONTROL_1 + i,
1943 pdata->gpio_cfg[i] & 0xffff); 1943 pdata->gpio_cfg[i] & 0x7fff);
1944 1944
1945 val = (pdata->gpio_cfg[i] & WM8903_GP1_FN_MASK) 1945 val = (pdata->gpio_cfg[i] & WM8903_GP1_FN_MASK)
1946 >> WM8903_GP1_FN_SHIFT; 1946 >> WM8903_GP1_FN_SHIFT;