diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-07-21 10:51:50 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 07:15:37 -0400 |
commit | 4f3edfe386da66558577fa636e4b33696497743e (patch) | |
tree | 5c7a9e95d6988c413b52bd5a0a5de60987227700 | |
parent | 86d2593afeb94eed82a4eecd7aae2f26766d61b6 (diff) |
[ARM] pxa: update pxafb.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | drivers/video/pxafb.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 0a301003d928..3a002a634ecf 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -1638,24 +1638,26 @@ pxafb_freq_policy(struct notifier_block *nb, unsigned long val, void *data) | |||
1638 | * Power management hooks. Note that we won't be called from IRQ context, | 1638 | * Power management hooks. Note that we won't be called from IRQ context, |
1639 | * unlike the blank functions above, so we may sleep. | 1639 | * unlike the blank functions above, so we may sleep. |
1640 | */ | 1640 | */ |
1641 | static int pxafb_suspend(struct platform_device *dev, pm_message_t state) | 1641 | static int pxafb_suspend(struct device *dev) |
1642 | { | 1642 | { |
1643 | struct pxafb_info *fbi = platform_get_drvdata(dev); | 1643 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
1644 | 1644 | ||
1645 | set_ctrlr_state(fbi, C_DISABLE_PM); | 1645 | set_ctrlr_state(fbi, C_DISABLE_PM); |
1646 | return 0; | 1646 | return 0; |
1647 | } | 1647 | } |
1648 | 1648 | ||
1649 | static int pxafb_resume(struct platform_device *dev) | 1649 | static int pxafb_resume(struct device *dev) |
1650 | { | 1650 | { |
1651 | struct pxafb_info *fbi = platform_get_drvdata(dev); | 1651 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
1652 | 1652 | ||
1653 | set_ctrlr_state(fbi, C_ENABLE_PM); | 1653 | set_ctrlr_state(fbi, C_ENABLE_PM); |
1654 | return 0; | 1654 | return 0; |
1655 | } | 1655 | } |
1656 | #else | 1656 | |
1657 | #define pxafb_suspend NULL | 1657 | static struct dev_pm_ops pxafb_pm_ops = { |
1658 | #define pxafb_resume NULL | 1658 | .suspend = pxafb_suspend, |
1659 | .resume = pxafb_resume, | ||
1660 | }; | ||
1659 | #endif | 1661 | #endif |
1660 | 1662 | ||
1661 | static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) | 1663 | static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) |
@@ -2248,11 +2250,12 @@ static int __devexit pxafb_remove(struct platform_device *dev) | |||
2248 | static struct platform_driver pxafb_driver = { | 2250 | static struct platform_driver pxafb_driver = { |
2249 | .probe = pxafb_probe, | 2251 | .probe = pxafb_probe, |
2250 | .remove = __devexit_p(pxafb_remove), | 2252 | .remove = __devexit_p(pxafb_remove), |
2251 | .suspend = pxafb_suspend, | ||
2252 | .resume = pxafb_resume, | ||
2253 | .driver = { | 2253 | .driver = { |
2254 | .owner = THIS_MODULE, | 2254 | .owner = THIS_MODULE, |
2255 | .name = "pxa2xx-fb", | 2255 | .name = "pxa2xx-fb", |
2256 | #ifdef CONFIG_PM | ||
2257 | .pm = &pxafb_pm_ops, | ||
2258 | #endif | ||
2256 | }, | 2259 | }, |
2257 | }; | 2260 | }; |
2258 | 2261 | ||