From: Xianglong Du Date: Fri, 14 Feb 2014 16:45:56 +0000 (-0800) Subject: Input: sirfsoc-onkey - use dev_get_drvdata instead of platform_get_drvdata X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a5e466451939153cbec4d5446be139ba666ee28d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Barry Song Signed-off-by: Dmitry Torokhov --- 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) 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; /*