From patchwork Thu Sep 5 03:21:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11132043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BAD751398 for ; Thu, 5 Sep 2019 03:34:42 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CB6C206BB for ; Thu, 5 Sep 2019 03:34:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.kernel.org header.i=@linux.kernel.org header.b="FWtGnalw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CB6C206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+26986+532+1554929+3438807@linux.kernel.org X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by groups.io with SMTP; Wed, 04 Sep 2019 20:34:41 -0700 X-Received: by mail.kernel.org (Postfix) id 9D33A217D7; Thu, 5 Sep 2019 03:34:40 +0000 (UTC) X-Greylist: delayed 466 seconds by postgrey-1.34 at mail.kernel.org; Thu, 05 Sep 2019 03:34:40 UTC DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DF23206BB X-Received: from condef-09.nifty.com (condef-09.nifty.com [202.248.20.74]) by mail.kernel.org (Postfix) with ESMTP id 4DF23206BB; Thu, 5 Sep 2019 03:34:40 +0000 (UTC) X-Received: from conuserg-12.nifty.com ([10.126.8.75])by condef-09.nifty.com with ESMTP id x853MCcu026772; Thu, 5 Sep 2019 12:22:12 +0900 X-Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x853LWmj015290; Thu, 5 Sep 2019 12:21:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x853LWmj015290 X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Linuxkernel+Patchwork-Soc via Email Integration Cc: linux-kernel@vger.kernel.org, soc@kernel.org, Masahiro Yamada , linux-arm-kernel@lists.infradead.org Subject: [PATCH] bus: uniphier-system-bus: use devm_platform_ioremap_resource() Date: Thu, 5 Sep 2019 12:21:22 +0900 Message-Id: <20190905032122.26076-1-yamada.masahiro@socionext.com> Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1567654481; bh=ucS2DHknOp9pPaRM0Z7j09MrhA9rbMv2TOsxfZJV2IU=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=FWtGnalwt0tLZA74Z+xjkZbAttgz0aChPUxQCUuaMwMrpTEzBLwjoM961GrAwXQQH4H X9juxipuDr32kFXgXDAs0Wxogcc6AXyahNX5VHNnKkZ/170GVyT1VpWQkPzHYHQP/17gm hO5kAXCRkGjEyTL8xTInrUotBbDWJX1w/nU= Replace the chain of platform_get_resource() and devm_ioremap_resource() with devm_platform_ioremap_resource(). This allows to remove the local variable for (struct resource *), and have one function call less. Signed-off-by: Masahiro Yamada --- drivers/bus/uniphier-system-bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c index e845c1a93f21..f70dedace20b 100644 --- a/drivers/bus/uniphier-system-bus.c +++ b/drivers/bus/uniphier-system-bus.c @@ -176,7 +176,6 @@ static int uniphier_system_bus_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct uniphier_system_bus_priv *priv; - struct resource *regs; const __be32 *ranges; u32 cells, addr, size; u64 paddr; @@ -186,8 +185,7 @@ static int uniphier_system_bus_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->membase = devm_ioremap_resource(dev, regs); + priv->membase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->membase)) return PTR_ERR(priv->membase);