Input: wm9712 - fix wm97xx_set_gpio() logic
[deliverable/linux.git] / drivers / input / touchscreen / wm97xx-core.c
index f944918466e5bd24d2909a0081b975cb3be770f7..cbfef1ea7e30b55945c82314a9da5bf9a42a2457 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/wm97xx.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <linux/slab.h>
 
 #define TS_NAME                        "wm97xx"
 #define WM_CORE_VERSION                "1.00"
@@ -199,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;
This page took 0.025568 seconds and 5 git commands to generate.