Input: ucb1400_ts - fix suspend and resume handling
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 1 Sep 2017 01:23:11 +0000 (18:23 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Sep 2017 21:23:56 +0000 (14:23 -0700)
Instead of stopping the touchscreen we were starting it in suspend, and
disabling it in resume.

Fixes: c899afedf168 ("Input: ucb1400_ts - convert to threaded IRQ")
Reported-by: Anton Volkov <avolkov@ispras.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/ucb1400_ts.c

index c1e23cfc6155eb855b19d115c65714862dcbb3c5..1a86cbd9326faade2043fe9cadacf2a0b0c2e806 100644 (file)
@@ -414,7 +414,7 @@ static int __maybe_unused ucb1400_ts_suspend(struct device *dev)
        mutex_lock(&idev->mutex);
 
        if (idev->users)
-               ucb1400_ts_start(ucb);
+               ucb1400_ts_stop(ucb);
 
        mutex_unlock(&idev->mutex);
        return 0;
@@ -428,7 +428,7 @@ static int __maybe_unused ucb1400_ts_resume(struct device *dev)
        mutex_lock(&idev->mutex);
 
        if (idev->users)
-               ucb1400_ts_stop(ucb);
+               ucb1400_ts_start(ucb);
 
        mutex_unlock(&idev->mutex);
        return 0;