提交 43ddc006 编写于 作者: M Mike Rapoport 提交者: Eric Miao

[ARM] pxa: update da903x_bl.c to use 'struct dev_pm_ops'

Signed-off-by: NMike Rapoport <mike@compulab.co.il>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 5d027cd2
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册