diff options
author | Xianglong Du <Xianglong.Du@csr.com> | 2014-02-14 11:45:56 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-02-15 16:08:46 -0500 |
commit | a5e466451939153cbec4d5446be139ba666ee28d (patch) | |
tree | 7a9d2f8fde34c7b492e72631bf7b31e86700e677 | |
parent | 3a80035bcbbaff1870a537b4ea57727290bded56 (diff) |
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: Xianglong Du <Xianglong.Du@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/misc/sirfsoc-onkey.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index d5b4a7674b9a..81cdf51f8246 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c | |||
@@ -143,7 +143,7 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev) | |||
143 | return error; | 143 | return error; |
144 | } | 144 | } |
145 | 145 | ||
146 | platform_set_drvdata(pdev, pwrcdrv); | 146 | dev_set_drvdata(&pdev->dev, pwrcdrv); |
147 | device_init_wakeup(&pdev->dev, 1); | 147 | device_init_wakeup(&pdev->dev, 1); |
148 | 148 | ||
149 | return 0; | 149 | return 0; |
@@ -159,8 +159,7 @@ static int sirfsoc_pwrc_remove(struct platform_device *pdev) | |||
159 | #ifdef CONFIG_PM_SLEEP | 159 | #ifdef CONFIG_PM_SLEEP |
160 | static int sirfsoc_pwrc_resume(struct device *dev) | 160 | static int sirfsoc_pwrc_resume(struct device *dev) |
161 | { | 161 | { |
162 | struct platform_device *pdev = to_platform_device(dev); | 162 | struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev); |
163 | struct sirfsoc_pwrc_drvdata *pwrcdrv = platform_get_drvdata(pdev); | ||
164 | struct input_dev *input = pwrcdrv->input; | 163 | struct input_dev *input = pwrcdrv->input; |
165 | 164 | ||
166 | /* | 165 | /* |