summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 14:17:36 +0100
committerKrzysztof Kozlowski <k.kozlowski@samsung.com>2016-02-25 02:09:36 +0100
commit81c258467c2a75bec01484f5e249b6dd3de407b6 (patch)
treec2f62c625ac4619ee24ad4e4fba4f35f3cc89f9c /arch/arm/plat-samsung
parentARM: EXYNOS: Code cleanup in map.h (diff)
downloadlinux-81c258467c2a75bec01484f5e249b6dd3de407b6.tar.xz
linux-81c258467c2a75bec01484f5e249b6dd3de407b6.zip
ARM: plat-samsung: use to_platform_device()
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/adc.c6
1 files changed, 2 insertions, 4 deletions
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;