diff mbox

[4/4] Input: ads7846 - modificatons of _stop()/_disable() conditions

Message ID 4CB4314C.7050308@gmail.com (mailing list archive)
State Rejected
Headers show

Commit Message

Jason Wang Oct. 12, 2010, 9:58 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/touchscreen/ads7846.c 
b/drivers/input/touchscreen/ads7846.c
index eab8b0b..25333db 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -253,9 +253,10 @@  static void ads7846_enable(struct ads7846 *ts)
{
mutex_lock(&ts->lock);

- if (ts->disabled && !ts->suspended)
+ if (ts->disabled && !ts->suspended) {
+ ts->disabled = false;
__ads7846_enable(ts);
-
+ }
ts->disabled = false;

mutex_unlock(&ts->lock);
@@ -919,10 +920,10 @@  static int ads7846_resume(struct spi_device *spi)
if (device_may_wakeup(&ts->spi->dev))
disable_irq_wake(ts->spi->irq);

+ ts->suspended = false;
+
if (!ts->disabled)
__ads7846_enable(ts);
-
- ts->suspended = false;
}

mutex_unlock(&ts->lock);