diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-07-21 16:57:47 +0300 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 19:15:35 +0800 |
commit | 43ddc00696c96a265a7fc48050b32fd0ed9d59e7 (patch) | |
tree | 0ec256e81b69d345cd7f597d11c06ebe1b3d8f3d /drivers/video/backlight | |
parent | 5d027cd222a052923a511ba693b60e512b3866f2 (diff) | |
download | kernel_samsung_crespo-43ddc00696c96a265a7fc48050b32fd0ed9d59e7.zip kernel_samsung_crespo-43ddc00696c96a265a7fc48050b32fd0ed9d59e7.tar.gz kernel_samsung_crespo-43ddc00696c96a265a7fc48050b32fd0ed9d59e7.tar.bz2 |
[ARM] pxa: update da903x_bl.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>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/da903x_bl.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 93bb434..701a108 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c @@ -154,34 +154,38 @@ static int da903x_backlight_remove(struct platform_device *pdev) } #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 + +static struct dev_pm_ops da903x_backlight_pm_ops = { + .suspend = da903x_backlight_suspend, + .resume = da903x_backlight_resume, +}; #endif static struct platform_driver da903x_backlight_driver = { .driver = { .name = "da903x-backlight", .owner = THIS_MODULE, +#ifdef CONFIG_PM + .pm = &da903x_backlight_pm_ops, +#endif }, .probe = da903x_backlight_probe, .remove = da903x_backlight_remove, - .suspend = da903x_backlight_suspend, - .resume = da903x_backlight_resume, }; static int __init da903x_backlight_init(void) |