From: Geliang Tang Date: Sun, 27 Dec 2015 13:17:36 +0000 (+0800) Subject: ARM: plat-samsung: use to_platform_device() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81c258467c2a75bec01484f5e249b6dd3de407b6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: plat-samsung: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski --- diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index efa6e85619ad..daf3db9f0058 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -422,8 +422,7 @@ static int s3c_adc_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int s3c_adc_suspend(struct device *dev) { - struct platform_device *pdev = container_of(dev, - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(dev); struct adc_device *adc = platform_get_drvdata(pdev); unsigned long flags; u32 con; @@ -444,8 +443,7 @@ static int s3c_adc_suspend(struct device *dev) static int s3c_adc_resume(struct device *dev) { - struct platform_device *pdev = container_of(dev, - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(dev); struct adc_device *adc = platform_get_drvdata(pdev); enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data; int ret;