Skip to content

Commit

Permalink
backlight: switch to da903x driver to dev_pm_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
  • Loading branch information
Mike Rapoport authored and Richard Purdie committed Sep 21, 2009
1 parent 3b96ea9 commit 0f7e727
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/video/backlight/da903x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f7e727

Please sign in to comment.