summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-07-21 16:57:47 +0300
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-21 20:59:12 +0100
commit0f7e7273803aa03ad7a0e210461a3db9d35e7abb (patch)
tree2ff22a466058e5ce679c14f2b643bb5c52000e7c /drivers
parent3b96ea9ef837c010f2187e0618d823fbdd8eeb54 (diff)
downloadlinux-0-day-0f7e7273803aa03ad7a0e210461a3db9d35e7abb.tar.gz
linux-0-day-0f7e7273803aa03ad7a0e210461a3db9d35e7abb.tar.xz
backlight: switch to da903x driver to dev_pm_ops
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/backlight/da903x_bl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c
index 93bb4340cc64e..386ecd2ea62bd 100644
--- a/drivers/video/backlight/da903x_bl.c
+++ b/drivers/video/backlight/da903x_bl.c
@@ -153,35 +153,35 @@ static int da903x_backlight_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-static int da903x_backlight_suspend(struct platform_device *pdev,
- pm_message_t state)
+static int da903x_backlight_suspend(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);
return da903x_backlight_set(bl, 0);
}
-static int da903x_backlight_resume(struct platform_device *pdev)
+static int da903x_backlight_resume(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct backlight_device *bl = platform_get_drvdata(pdev);
backlight_update_status(bl);
return 0;
}
-#else
-#define da903x_backlight_suspend NULL
-#define da903x_backlight_resume NULL
-#endif
+
+static struct dev_pm_ops da903x_backlight_pm_ops = {
+ .suspend = da903x_backlight_suspend,
+ .resume = da903x_backlight_resume,
+};
static struct platform_driver da903x_backlight_driver = {
.driver = {
.name = "da903x-backlight",
.owner = THIS_MODULE,
+ .pm = &da903x_backlight_pm_ops,
},
.probe = da903x_backlight_probe,
.remove = da903x_backlight_remove,
- .suspend = da903x_backlight_suspend,
- .resume = da903x_backlight_resume,
};
static int __init da903x_backlight_init(void)