aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/imxfb.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2005-10-28 12:52:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:56 -0400
commit9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch)
tree967e26d3a23c24dd52b114d672312c207714308c /drivers/video/imxfb.c
parenta3a3395e487abc4c1371fe319a8ecbb3913a70a4 (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/video/imxfb.c')
-rw-r--r--drivers/video/imxfb.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 1d54d3d6960b..0b9301facbd3 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -424,23 +424,21 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi)
424 * Power management hooks. Note that we won't be called from IRQ context, 424 * Power management hooks. Note that we won't be called from IRQ context,
425 * unlike the blank functions above, so we may sleep. 425 * unlike the blank functions above, so we may sleep.
426 */ 426 */
427static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level) 427static int imxfb_suspend(struct device *dev, pm_message_t state)
428{ 428{
429 struct imxfb_info *fbi = dev_get_drvdata(dev); 429 struct imxfb_info *fbi = dev_get_drvdata(dev);
430 pr_debug("%s\n",__FUNCTION__); 430 pr_debug("%s\n",__FUNCTION__);
431 431
432 if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) 432 imxfb_disable_controller(fbi);
433 imxfb_disable_controller(fbi);
434 return 0; 433 return 0;
435} 434}
436 435
437static int imxfb_resume(struct device *dev, u32 level) 436static int imxfb_resume(struct device *dev)
438{ 437{
439 struct imxfb_info *fbi = dev_get_drvdata(dev); 438 struct imxfb_info *fbi = dev_get_drvdata(dev);
440 pr_debug("%s\n",__FUNCTION__); 439 pr_debug("%s\n",__FUNCTION__);
441 440
442 if (level == RESUME_ENABLE) 441 imxfb_enable_controller(fbi);
443 imxfb_enable_controller(fbi);
444 return 0; 442 return 0;
445} 443}
446#else 444#else