diff options
Diffstat (limited to 'drivers/video/w100fb.c')
-rw-r--r-- | drivers/video/w100fb.c | 46 |
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 | ||
441 | static int w100fb_suspend(struct device *dev, pm_message_t state, uint32_t level) | 441 | static 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 | ||
457 | static int w100fb_resume(struct device *dev, uint32_t level) | 456 | static 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 |