提交 a5e46645 编写于 作者: X Xianglong Du 提交者: Dmitry Torokhov

Input: sirfsoc-onkey - use dev_get_drvdata instead of platform_get_drvdata

In resume entry, use dev_get_drvdata() instead of to_platform_device(dev) +
platform_get_drvdata(pdev).
Signed-off-by: NXianglong Du <Xianglong.Du@csr.com>
Signed-off-by: NBarry Song <Baohua.Song@csr.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 3a80035b
......@@ -143,7 +143,7 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev)
return error;
}
platform_set_drvdata(pdev, pwrcdrv);
dev_set_drvdata(&pdev->dev, pwrcdrv);
device_init_wakeup(&pdev->dev, 1);
return 0;
......@@ -159,8 +159,7 @@ static int sirfsoc_pwrc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int sirfsoc_pwrc_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct sirfsoc_pwrc_drvdata *pwrcdrv = platform_get_drvdata(pdev);
struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev);
struct input_dev *input = pwrcdrv->input;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册