Message ID | ad91078d5cbe93341709b249a83ae81c00eaa3d4.1451221174.git.geliangtang@163.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 27.12.2015 22:17, Geliang Tang wrote: > Use to_platform_device() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> > --- > arch/arm/plat-samsung/adc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) Thanks! Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 28.12.2015 11:01, Krzysztof Kozlowski wrote: > On 27.12.2015 22:17, Geliang Tang wrote: >> Use to_platform_device() instead of open-coding it. >> >> Signed-off-by: Geliang Tang <geliangtang@163.com> >> --- >> arch/arm/plat-samsung/adc.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) > > Thanks! > > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Applied, thanks, https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/soc Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index efa6e85..daf3db9 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;
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> --- arch/arm/plat-samsung/adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)