diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 17:02:24 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 17:02:30 +0200 |
commit | 28f9f19db9dda54c851d5689539d86f6fc008773 (patch) | |
tree | 469f5d7b24871b6fe001b7ad9acac859405f4822 /drivers/video/backlight | |
parent | ARM: 5621/1: at91/dmaengine: integration of at_hdmac driver in at91sam9g45 se... (diff) | |
parent | [ARM] pxafb: add accelerator ID for PXA3xx GCU (diff) | |
download | linux-28f9f19db9dda54c851d5689539d86f6fc008773.tar.xz linux-28f9f19db9dda54c851d5689539d86f6fc008773.zip |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
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 93bb4340cc64..701a1081e199 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) |