aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-07-21 09:57:47 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-21 15:59:12 -0400
commit0f7e7273803aa03ad7a0e210461a3db9d35e7abb (patch)
tree2ff22a466058e5ce679c14f2b643bb5c52000e7c /drivers/video
parent3b96ea9ef837c010f2187e0618d823fbdd8eeb54 (diff)
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/video')
-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 93bb4340cc64..386ecd2ea62b 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)
153 return 0; 153 return 0;
154} 154}
155 155
156#ifdef CONFIG_PM 156static int da903x_backlight_suspend(struct device *dev)
157static int da903x_backlight_suspend(struct platform_device *pdev,
158 pm_message_t state)
159{ 157{
158 struct platform_device *pdev = to_platform_device(dev);
160 struct backlight_device *bl = platform_get_drvdata(pdev); 159 struct backlight_device *bl = platform_get_drvdata(pdev);
161 return da903x_backlight_set(bl, 0); 160 return da903x_backlight_set(bl, 0);
162} 161}
163 162
164static int da903x_backlight_resume(struct platform_device *pdev) 163static int da903x_backlight_resume(struct device *dev)
165{ 164{
165 struct platform_device *pdev = to_platform_device(dev);
166 struct backlight_device *bl = platform_get_drvdata(pdev); 166 struct backlight_device *bl = platform_get_drvdata(pdev);
167 167
168 backlight_update_status(bl); 168 backlight_update_status(bl);
169 return 0; 169 return 0;
170} 170}
171#else 171
172#define da903x_backlight_suspend NULL 172static struct dev_pm_ops da903x_backlight_pm_ops = {
173#define da903x_backlight_resume NULL 173 .suspend = da903x_backlight_suspend,
174#endif 174 .resume = da903x_backlight_resume,
175};
175 176
176static struct platform_driver da903x_backlight_driver = { 177static struct platform_driver da903x_backlight_driver = {
177 .driver = { 178 .driver = {
178 .name = "da903x-backlight", 179 .name = "da903x-backlight",
179 .owner = THIS_MODULE, 180 .owner = THIS_MODULE,
181 .pm = &da903x_backlight_pm_ops,
180 }, 182 },
181 .probe = da903x_backlight_probe, 183 .probe = da903x_backlight_probe,
182 .remove = da903x_backlight_remove, 184 .remove = da903x_backlight_remove,
183 .suspend = da903x_backlight_suspend,
184 .resume = da903x_backlight_resume,
185}; 185};
186 186
187static int __init da903x_backlight_init(void) 187static int __init da903x_backlight_init(void)