Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81c25846 authored by Geliang Tang's avatar Geliang Tang Committed by Krzysztof Kozlowski
Browse files

ARM: plat-samsung: use to_platform_device()



Use to_platform_device() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
parent f2cac805
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;