Commit 2dbc8a23cc2e677422f6dea991aca4e3d31ab65f
1 parent
684dcd0561
Exists in
master
and in
7 other branches
video: hitfb: Move over to dev_pm_ops.
A trivial update to move hitfb over to dev_pm_ops. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 1 changed file with 9 additions and 8 deletions Side-by-side Diff
drivers/video/hitfb.c
... | ... | @@ -429,8 +429,7 @@ |
429 | 429 | return 0; |
430 | 430 | } |
431 | 431 | |
432 | -#ifdef CONFIG_PM | |
433 | -static int hitfb_suspend(struct platform_device *dev, pm_message_t state) | |
432 | +static int hitfb_suspend(struct device *dev) | |
434 | 433 | { |
435 | 434 | u16 v; |
436 | 435 | |
... | ... | @@ -442,7 +441,7 @@ |
442 | 441 | return 0; |
443 | 442 | } |
444 | 443 | |
445 | -static int hitfb_resume(struct platform_device *dev) | |
444 | +static int hitfb_resume(struct device *dev) | |
446 | 445 | { |
447 | 446 | u16 v; |
448 | 447 | |
449 | 448 | |
450 | 449 | |
451 | 450 | |
... | ... | @@ -456,17 +455,19 @@ |
456 | 455 | |
457 | 456 | return 0; |
458 | 457 | } |
459 | -#endif | |
460 | 458 | |
459 | +static struct dev_pm_ops hitfb_dev_pm_ops = { | |
460 | + .suspend = hitfb_suspend, | |
461 | + .resume = hitfb_resume, | |
462 | +}; | |
463 | + | |
461 | 464 | static struct platform_driver hitfb_driver = { |
462 | 465 | .probe = hitfb_probe, |
463 | 466 | .remove = __exit_p(hitfb_remove), |
464 | -#ifdef CONFIG_PM | |
465 | - .suspend = hitfb_suspend, | |
466 | - .resume = hitfb_resume, | |
467 | -#endif | |
468 | 467 | .driver = { |
469 | 468 | .name = "hitfb", |
469 | + .owner = THIS_MODULE, | |
470 | + .pm = &hitfb_dev_pm_ops, | |
470 | 471 | }, |
471 | 472 | }; |
472 | 473 |