From patchwork Fri Aug 23 02:34:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 2848496 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6DBC39F2F4 for ; Fri, 23 Aug 2013 02:37:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF824202AB for ; Fri, 23 Aug 2013 02:37:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00FD7202A7 for ; Fri, 23 Aug 2013 02:37:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VChFJ-0006Pu-TT; Fri, 23 Aug 2013 02:37:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VChFH-0007Qz-HS; Fri, 23 Aug 2013 02:37:03 +0000 Received: from na3sys009aog111.obsmtp.com ([74.125.149.205]) by merlin.infradead.org with smtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VChFB-0007QR-1r for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2013 02:37:01 +0000 Received: from sc-owa02.marvell.com ([199.233.58.137]) (using TLSv1) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKUhbKnW38WYJY15sVlEgBojh/pyFBrPbf@postini.com; Thu, 22 Aug 2013 19:36:56 PDT Received: from maili.marvell.com (10.93.76.43) by sc-owa02.marvell.com (10.93.76.22) with Microsoft SMTP Server id 8.3.213.0; Thu, 22 Aug 2013 19:35:57 -0700 Received: from xhacker.marvell.com (unknown [10.37.135.179]) by maili.marvell.com (Postfix) with ESMTP id 94C701CCD9C; Thu, 22 Aug 2013 19:35:54 -0700 (PDT) From: Jisheng Zhang To: , , , , , , , , Subject: [PATCH v2 4/4] pinctrl: mvebu: Convert to use devm_ioremap_resource Date: Fri, 23 Aug 2013 10:34:02 +0800 Message-ID: <1377225242-5854-5-git-send-email-jszhang@marvell.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1377225242-5854-1-git-send-email-jszhang@marvell.com> References: <1377225242-5854-1-git-send-email-jszhang@marvell.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130822_223657_256066_5A61ED89 X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -4.2 (----) Cc: linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_RHS_DOB autolearn=unavailable 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 Signed-off-by: Jisheng Zhang Reviewed-by: Ezequiel Garcia T --- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index bb7ddb1..1caa45f 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c @@ -579,7 +579,7 @@ static int mvebu_pinctrl_build_functions(struct platform_device *pdev, int mvebu_pinctrl_probe(struct platform_device *pdev) { struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); - struct device_node *np = pdev->dev.of_node; + struct resource *res; struct mvebu_pinctrl *pctl; void __iomem *base; struct pinctrl_pin_desc *pdesc; @@ -591,11 +591,10 @@ int mvebu_pinctrl_probe(struct platform_device *pdev) return -EINVAL; } - base = of_iomap(np, 0); - if (!base) { - dev_err(&pdev->dev, "unable to get base address\n"); - return -ENODEV; - } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); pctl = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pinctrl), GFP_KERNEL);