From patchwork Sun Dec 27 13:17:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 7923501 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 56E5C9F32E for ; Sun, 27 Dec 2015 13:19:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AB53201CD for ; Sun, 27 Dec 2015 13:19:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3658620295 for ; Sun, 27 Dec 2015 13:19:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754827AbbL0NTr (ORCPT ); Sun, 27 Dec 2015 08:19:47 -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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=cNcfZKrDUtVrxg4ndj WA+6D8u79TKnDxPTH6BaJ3x7w=; b=JnEQ54ojf6f8Vq2hoJeWqTRZ29KL9jQKda 0gNq8QfgCRMUqpD6QYS8eq9qU/q1dNj6aE2fgSUlAp66G4Uh7O5ogF3srfJb3PaZ yzF2/C0qwQs7gwcoZHjJ7SnL4UHYuPcYzdx1PX6YfyQKKNvJ1Qa0/Fht0J7WA8Y3 UKeNEMOkE= Received: from localhost (unknown [116.77.145.148]) by smtp3 (Coremail) with SMTP id DdGowEBpQEHx5H9WcqqJAA--.5707S3; Sun, 27 Dec 2015 21:17:38 +0800 (CST) 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Krzysztof Kozlowski --- 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;