aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/w100fb.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/w100fb.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/w100fb.c')
-rw-r--r--drivers/video/w100fb.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 0030c071da8f..752bf88906a9 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -438,36 +438,34 @@ static void w100fb_restore_vidmem(struct w100fb_par *par)
438 } 438 }
439} 439}
440 440
441static int w100fb_suspend(struct device *dev, pm_message_t state, uint32_t level) 441static int w100fb_suspend(struct device *dev, pm_message_t state)
442{ 442{
443 if (level == SUSPEND_POWER_DOWN) { 443 struct fb_info *info = dev_get_drvdata(dev);
444 struct fb_info *info = dev_get_drvdata(dev); 444 struct w100fb_par *par=info->par;
445 struct w100fb_par *par=info->par; 445 struct w100_tg_info *tg = par->mach->tg;
446 struct w100_tg_info *tg = par->mach->tg; 446
447 447 w100fb_save_vidmem(par);
448 w100fb_save_vidmem(par); 448 if(tg && tg->suspend)
449 if(tg && tg->suspend) 449 tg->suspend(par);
450 tg->suspend(par); 450 w100_suspend(W100_SUSPEND_ALL);
451 w100_suspend(W100_SUSPEND_ALL); 451 par->blanked = 1;
452 par->blanked = 1; 452
453 }
454 return 0; 453 return 0;
455} 454}
456 455
457static int w100fb_resume(struct device *dev, uint32_t level) 456static int w100fb_resume(struct device *dev)
458{ 457{
459 if (level == RESUME_POWER_ON) { 458 struct fb_info *info = dev_get_drvdata(dev);
460 struct fb_info *info = dev_get_drvdata(dev); 459 struct w100fb_par *par=info->par;
461 struct w100fb_par *par=info->par; 460 struct w100_tg_info *tg = par->mach->tg;
462 struct w100_tg_info *tg = par->mach->tg; 461
462 w100_hw_init(par);
463 w100fb_activate_var(par);
464 w100fb_restore_vidmem(par);
465 if(tg && tg->resume)
466 tg->resume(par);
467 par->blanked = 0;
463 468
464 w100_hw_init(par);
465 w100fb_activate_var(par);
466 w100fb_restore_vidmem(par);
467 if(tg && tg->resume)
468 tg->resume(par);
469 par->blanked = 0;
470 }
471 return 0; 469 return 0;
472} 470}
473#else 471#else