ASoC: Accept any logical value for WM8962 GPIO set()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 31 Jan 2011 13:41:03 +0000 (13:41 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 31 Jan 2011 16:07:12 +0000 (16:07 +0000)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/wm8962.c

index 5c7b730..3b71dd6 100644 (file)
@@ -3635,7 +3635,7 @@ static void wm8962_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
        struct snd_soc_codec *codec = wm8962->codec;
 
        snd_soc_update_bits(codec, WM8962_GPIO_BASE + offset,
-                           WM8962_GP2_LVL, value << WM8962_GP2_LVL_SHIFT);
+                           WM8962_GP2_LVL, !!value << WM8962_GP2_LVL_SHIFT);
 }
 
 static int wm8962_gpio_direction_out(struct gpio_chip *chip,