From 56823a40ff96ec275f3bb4803d5d69f5e6eb261e Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Tue, 21 Jul 2009 16:57:47 +0300 Subject: [PATCH] --- yaml --- r: 166459 b: refs/heads/master c: 0f7e7273803aa03ad7a0e210461a3db9d35e7abb h: refs/heads/master i: 166457: ab7d051225f74a4e444a0751537dda8310acc542 166455: e082f23fd90520a48e6dfc68937568235b0abffb v: v3 --- [refs] | 2 +- trunk/drivers/video/backlight/da903x_bl.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 236bf7db1907..95277c64cccf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3b96ea9ef837c010f2187e0618d823fbdd8eeb54 +refs/heads/master: 0f7e7273803aa03ad7a0e210461a3db9d35e7abb diff --git a/trunk/drivers/video/backlight/da903x_bl.c b/trunk/drivers/video/backlight/da903x_bl.c index 93bb4340cc64..386ecd2ea62b 100644 --- a/trunk/drivers/video/backlight/da903x_bl.c +++ b/trunk/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)