aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/pxafb.c21
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 */
1641static int pxafb_suspend(struct platform_device *dev, pm_message_t state) 1641static 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
1649static int pxafb_resume(struct platform_device *dev) 1649static 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 1657static 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
1661static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) 1663static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi)
@@ -2248,11 +2250,12 @@ static int __devexit pxafb_remove(struct platform_device *dev)
2248static struct platform_driver pxafb_driver = { 2250static 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