Input: wm9712 - fix wm97xx_set_gpio() logic
authorManuel Lauss <manuel.lauss@googlemail.com>
Wed, 19 May 2010 17:11:13 +0000 (10:11 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 19 May 2010 17:13:35 +0000 (10:13 -0700)
WM97XX_GPIO_HIGH is not a bitmap and should to be treated as such.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/wm97xx-core.c

index 5109bf3..cbfef1e 100644 (file)
@@ -200,7 +200,7 @@ void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
        mutex_lock(&wm->codec_mutex);
        reg = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
 
-       if (status & WM97XX_GPIO_HIGH)
+       if (status == WM97XX_GPIO_HIGH)
                reg |= gpio;
        else
                reg &= ~gpio;