Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754841AbbL0NTs (ORCPT ); Sun, 27 Dec 2015 08:19:48 -0500 Received: from m50-133.163.com ([123.125.50.133]:60604 "EHLO m50-133.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752426AbbL0NTp (ORCPT ); Sun, 27 Dec 2015 08:19:45 -0500 From: Geliang Tang To: Kukjin Kim , Krzysztof Kozlowski , Russell King Cc: Geliang Tang , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] ARM: plat-samsung: use to_platform_device() Date: Sun, 27 Dec 2015 21:17:36 +0800 Message-Id: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: X-CM-TRANSID: DdGowEBpQEHx5H9WcqqJAA--.5707S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7Gw1xAF4xAF4rJr18tryUGFg_yoW8Jr18pF 1UGa97GFW8GFyUK3W8Xr1DZF4jyw1Skw1Iqr18Ja1Sk3s8Xr95XF9Ygry7AanxGFWkGa1f Xr9IkFyrZF4DZw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UMHqcUUUUU= X-Originating-IP: [116.77.145.148] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/xtbByhPdmVO+g0gQZgAAsN Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1397 Lines: 40 Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang --- arch/arm/plat-samsung/adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/