Input: max77693-haptic - fix state check in imax77693_haptic_disable()
authorJaewon Kim <jaewon02.kim@samsung.com>
Thu, 16 Oct 2014 20:56:52 +0000 (13:56 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Oct 2014 21:05:39 +0000 (14:05 -0700)
The check to see whether the device is already disabled in
max77693_haptic_disable() was inversed, this change corrects it.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/max77693-haptic.c

index d605db4d2f397f4a5abfa8862936775c7c7b07d3..7b1fde93799ee771b638cd128fe3908a07ec82ef 100644 (file)
@@ -152,7 +152,7 @@ static void max77693_haptic_disable(struct max77693_haptic *haptic)
 {
        int error;
 
-       if (haptic->enabled)
+       if (!haptic->enabled)
                return;
 
        error = max77693_haptic_configure(haptic, false);