Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp338313ybe; Wed, 4 Sep 2019 21:27:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiimoJVAFWsn15TH/cPbLJJoJPYbVioDVen5Lo4rJ9JRmmTMduCCNy5TbSZJ372sjjqnPD X-Received: by 2002:a63:550d:: with SMTP id j13mr1342863pgb.173.1567657666109; Wed, 04 Sep 2019 21:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567657666; cv=none; d=google.com; s=arc-20160816; b=emM3dBvQFbNZ1+LTrKXVFszjdszzAAQ8aV1RTNIeb8tlRG/s7GqmM9RlZJHHb9Tfvs glI6PfzrXvJnTbh5UoCxY9C6rnHuoS6Vvjvbk7DPu2Ul0OVFv5hOg4zb4mvX3eWoNg2L Xi1NYYHf7UfAyqCHE15B1+t/HYEHfH61lDoi6xcKIYMgzrSSKu8kyic2C5wO5UqD7nAp FlO3St9anWyFP/2n9v+hfnXzO8/TmnJ+WYvbF2htk4zFoQ/PxaQr4tq4q0+lqu3cjGHY rcBsBz7k1G/LaWtvG5RZdvceBULE6845rtGw3EqEAy6KZRqY+XGvC89h4EDy+NxmfEwV gnpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=9WB476Jgz2iwQGx8WhZTdMWCoqoGKePNIED8HdmTYP8=; b=eIzlrF+NMp76W4yGZE4MewykOwb+5cqfuiCW07gmXRJVkJIdbIK4MkSpp+aucDtYyf zxHRqzeVOY57WqEuTQZmTvRb8I+SsrcSjJLFoM0gMPIn0EepuMvVAFwBu0i7gxF94YEt qcCnLSGMSCmMPjWbOsKFEMSOf8jVjvMM4RiAnM5Q5aDUqfSetjZ6yFO/QlBQcbtqk7bd C3JfqWKljgnQMDakT3o/mZ0zDZtWjGCwOdfc98MgSeljeujrkXhjimuSSnVmhnWHUBIV tl/YN/auc1/A8ler2kgfPnLSA6Q4YRuen1qHCXF0DMpNsXqP8RVUYX0mZhqpZUG9bzGw g79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kiLVhU38; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si856626pfd.63.2019.09.04.21.27.17; Wed, 04 Sep 2019 21:27:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kiLVhU38; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730780AbfIEDWS (ORCPT + 99 others); Wed, 4 Sep 2019 23:22:18 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:18740 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728267AbfIEDWS (ORCPT ); Wed, 4 Sep 2019 23:22:18 -0400 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1567653693; bh=9WB476Jgz2iwQGx8WhZTdMWCoqoGKePNIED8HdmTYP8=; h=From:To:Cc:Subject:Date:From; b=kiLVhU38zUPA7LQClZMW0sQWODRJX2F4UsE3x4zKxgNMRBycx0jt9yloe0LKQDCwZ C52osBMh2fmB07x5WN8kwdOEWM/gHY3Pg85mAbqBUa6aR13h3gcE4WS7T+ulBG2Uwh w/bZf/ulT7dlgTF5NneQ56FhEWLWYhwuCGjWp8RlIv2kieTJjiSwjnxs/RSb+xlb4G x9NwOTy0e09Nc4H/e0TlyrNBDG2qw93BNH5qmG3nxFl6YFqzv/Lk2lDGeympBrJuFB 6HNkutN+BF8n+eQdOwiPni/t/ngJsYhJf08bdIoyjpqzIFtyh0MUpL51lAIiUHEY9x p1/sGsVffIBlA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: arm@kernel.org, Olof Johansson , Arnd Bergmann 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> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.17.1