diff options
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 8 | ||||
-rw-r--r-- | drivers/input/touchscreen/mk712.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/ucb1400_ts.c | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index fd9c5d5..58934a4 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -116,6 +116,7 @@ struct ads7846 { // FIXME remove "irq_disabled" unsigned irq_disabled:1; /* P: lock */ unsigned disabled:1; + unsigned is_suspended:1; int (*filter)(void *data, int data_idx, int *val); void *filter_data; @@ -203,7 +204,7 @@ static void ads7846_disable(struct ads7846 *ts); static int device_suspended(struct device *dev) { struct ads7846 *ts = dev_get_drvdata(dev); - return dev->power.power_state.event != PM_EVENT_ON || ts->disabled; + return ts->is_suspended || ts->disabled; } static int ads7846_read12_ser(struct device *dev, unsigned command) @@ -794,7 +795,7 @@ static int ads7846_suspend(struct spi_device *spi, pm_message_t message) spin_lock_irq(&ts->lock); - spi->dev.power.power_state = message; + ts->is_suspended = 1; ads7846_disable(ts); spin_unlock_irq(&ts->lock); @@ -809,7 +810,7 @@ static int ads7846_resume(struct spi_device *spi) spin_lock_irq(&ts->lock); - spi->dev.power.power_state = PMSG_ON; + ts->is_suspended = 0; ads7846_enable(ts); spin_unlock_irq(&ts->lock); @@ -871,7 +872,6 @@ static int __devinit ads7846_probe(struct spi_device *spi) } dev_set_drvdata(&spi->dev, ts); - spi->dev.power.power_state = PMSG_ON; ts->spi = spi; ts->input = input_dev; diff --git a/drivers/input/touchscreen/mk712.c b/drivers/input/touchscreen/mk712.c index 80a6588..efd3aeb 100644 --- a/drivers/input/touchscreen/mk712.c +++ b/drivers/input/touchscreen/mk712.c @@ -36,7 +36,6 @@ */ #include <linux/module.h> -#include <linux/moduleparam.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 986a836..607f993 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -15,7 +15,6 @@ */ #include <linux/module.h> -#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/completion.h> #include <linux/delay.h> |