diff options
author | Russell King <rmk@arm.linux.org.uk> | 2005-10-28 12:52:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:52:56 -0400 |
commit | 9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch) | |
tree | 967e26d3a23c24dd52b114d672312c207714308c /drivers/input/touchscreen | |
parent | a3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff) |
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/corgi_ts.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 40ae183ba1cd..0ba3e6562bff 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -231,34 +231,32 @@ static irqreturn_t ts_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | #ifdef CONFIG_PM | 233 | #ifdef CONFIG_PM |
234 | static int corgits_suspend(struct device *dev, pm_message_t state, uint32_t level) | 234 | static int corgits_suspend(struct device *dev, pm_message_t state) |
235 | { | 235 | { |
236 | if (level == SUSPEND_POWER_DOWN) { | 236 | struct corgi_ts *corgi_ts = dev_get_drvdata(dev); |
237 | struct corgi_ts *corgi_ts = dev_get_drvdata(dev); | ||
238 | |||
239 | if (corgi_ts->pendown) { | ||
240 | del_timer_sync(&corgi_ts->timer); | ||
241 | corgi_ts->tc.pressure = 0; | ||
242 | new_data(corgi_ts, NULL); | ||
243 | corgi_ts->pendown = 0; | ||
244 | } | ||
245 | corgi_ts->power_mode = PWR_MODE_SUSPEND; | ||
246 | 237 | ||
247 | corgi_ssp_ads7846_putget((1u << ADSCTRL_ADR_SH) | ADSCTRL_STS); | 238 | if (corgi_ts->pendown) { |
239 | del_timer_sync(&corgi_ts->timer); | ||
240 | corgi_ts->tc.pressure = 0; | ||
241 | new_data(corgi_ts, NULL); | ||
242 | corgi_ts->pendown = 0; | ||
248 | } | 243 | } |
244 | corgi_ts->power_mode = PWR_MODE_SUSPEND; | ||
245 | |||
246 | corgi_ssp_ads7846_putget((1u << ADSCTRL_ADR_SH) | ADSCTRL_STS); | ||
247 | |||
249 | return 0; | 248 | return 0; |
250 | } | 249 | } |
251 | 250 | ||
252 | static int corgits_resume(struct device *dev, uint32_t level) | 251 | static int corgits_resume(struct device *dev) |
253 | { | 252 | { |
254 | if (level == RESUME_POWER_ON) { | 253 | struct corgi_ts *corgi_ts = dev_get_drvdata(dev); |
255 | struct corgi_ts *corgi_ts = dev_get_drvdata(dev); | 254 | |
255 | corgi_ssp_ads7846_putget((4u << ADSCTRL_ADR_SH) | ADSCTRL_STS); | ||
256 | /* Enable Falling Edge */ | ||
257 | set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING); | ||
258 | corgi_ts->power_mode = PWR_MODE_ACTIVE; | ||
256 | 259 | ||
257 | corgi_ssp_ads7846_putget((4u << ADSCTRL_ADR_SH) | ADSCTRL_STS); | ||
258 | /* Enable Falling Edge */ | ||
259 | set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING); | ||
260 | corgi_ts->power_mode = PWR_MODE_ACTIVE; | ||
261 | } | ||
262 | return 0; | 260 | return 0; |
263 | } | 261 | } |
264 | #else | 262 | #else |