diff options
author | David Brownell <david-b@pacbell.net> | 2007-12-14 01:26:33 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-01-21 01:11:07 -0500 |
commit | fbb38e30e414c9ccd8b5d04344264522551008bc (patch) | |
tree | 359d97bcadb08cab12fdf8e1279159dbee4733f6 /drivers/input | |
parent | 3b04a61107dfe46dbfc1796298b59ca3c0a09cd9 (diff) |
Input: ads7846 - stop updating dev->power.power_state
This stops the ads7846 driver from using dev->power.power_state; that field is
deprecated (overdue for removal) and the only reason to update it was to make
the /sys/devices/.../power/state files (now removed) work better.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index f59aecf5ec15..1c08ecc54770 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -116,6 +116,7 @@ struct ads7846 { | |||
116 | // FIXME remove "irq_disabled" | 116 | // FIXME remove "irq_disabled" |
117 | unsigned irq_disabled:1; /* P: lock */ | 117 | unsigned irq_disabled:1; /* P: lock */ |
118 | unsigned disabled:1; | 118 | unsigned disabled:1; |
119 | unsigned is_suspended:1; | ||
119 | 120 | ||
120 | int (*filter)(void *data, int data_idx, int *val); | 121 | int (*filter)(void *data, int data_idx, int *val); |
121 | void *filter_data; | 122 | void *filter_data; |
@@ -203,7 +204,7 @@ static void ads7846_disable(struct ads7846 *ts); | |||
203 | static int device_suspended(struct device *dev) | 204 | static int device_suspended(struct device *dev) |
204 | { | 205 | { |
205 | struct ads7846 *ts = dev_get_drvdata(dev); | 206 | struct ads7846 *ts = dev_get_drvdata(dev); |
206 | return dev->power.power_state.event != PM_EVENT_ON || ts->disabled; | 207 | return ts->is_suspended || ts->disabled; |
207 | } | 208 | } |
208 | 209 | ||
209 | static int ads7846_read12_ser(struct device *dev, unsigned command) | 210 | static int ads7846_read12_ser(struct device *dev, unsigned command) |
@@ -795,7 +796,7 @@ static int ads7846_suspend(struct spi_device *spi, pm_message_t message) | |||
795 | 796 | ||
796 | spin_lock_irq(&ts->lock); | 797 | spin_lock_irq(&ts->lock); |
797 | 798 | ||
798 | spi->dev.power.power_state = message; | 799 | ts->is_suspended = 1; |
799 | ads7846_disable(ts); | 800 | ads7846_disable(ts); |
800 | 801 | ||
801 | spin_unlock_irq(&ts->lock); | 802 | spin_unlock_irq(&ts->lock); |
@@ -810,7 +811,7 @@ static int ads7846_resume(struct spi_device *spi) | |||
810 | 811 | ||
811 | spin_lock_irq(&ts->lock); | 812 | spin_lock_irq(&ts->lock); |
812 | 813 | ||
813 | spi->dev.power.power_state = PMSG_ON; | 814 | ts->is_suspended = 0; |
814 | ads7846_enable(ts); | 815 | ads7846_enable(ts); |
815 | 816 | ||
816 | spin_unlock_irq(&ts->lock); | 817 | spin_unlock_irq(&ts->lock); |
@@ -872,7 +873,6 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
872 | } | 873 | } |
873 | 874 | ||
874 | dev_set_drvdata(&spi->dev, ts); | 875 | dev_set_drvdata(&spi->dev, ts); |
875 | spi->dev.power.power_state = PMSG_ON; | ||
876 | 876 | ||
877 | ts->spi = spi; | 877 | ts->spi = spi; |
878 | ts->input = input_dev; | 878 | ts->input = input_dev; |