Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1359848imc; Mon, 11 Mar 2019 11:58:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJXSonOEa2+m+K5UDI2YNyEwa5gB2KsyD58syBLi1NIdGrPN87vFpZV5Qr0px2CLwVe/QG X-Received: by 2002:a63:104e:: with SMTP id 14mr31123302pgq.185.1552330720944; Mon, 11 Mar 2019 11:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552330720; cv=none; d=google.com; s=arc-20160816; b=yWvWi5kRM+/2Gbpgcr7lNsaI6skRotLV+E2+/oV+sUfg2kQOTuPPofJKKoPgBWL5wn cq5k2Gv5FtBDg9WO2KlSepGFyLqKJry3KU9XEvFIeaPucONHO4ctOLIg9xrXJ6OfvQTy T1KYKPTQsTFNqVH1x5xwz0bv1oRIIAtxHJF0D5n0KNZYLqgWpzPiqzt1ZBhUUc3Lj5Uq 4RDIc0JmHJk9iFzJY5eKYef3dUAgCoLV6v6VDqvqK10DMlntugTjHoH3mg9ZbklNJANa 02NOL5mLqjJYShNG7uZ0kM7ufoCHHrzbO/zDBJHgw0nOYSRW/bCMd+UeZ6RzJ3yflC9J XjHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=J5hBinHXqtWWu2WeL2SyRqfMuZwzCsU6la+urvNtbps=; b=I+xFZK5JGWwAJdF1dRvmUdx9VT39sjKPbLB5L9PA21OMSLIwRNToql0BDip60DcYY/ yikXmw9uV8sAO2WM9MNtAgCMKEleA/F4Ulj6gQu+nN9GB4IytUbUhXWsV0mLxRwGDRs2 CfT7YR00/UqFue+SUMq4dKmU/b9MV6XbJQwnzOdds3K1nOMTRQR7sN0+3qEKlacVIkUD qb5H/VkylncQCg6rhkyzzBhB5xGENtYij3WzqCxLhbFDvKtauesIYe7DVrCExg3jRLH9 PXKc+EaOOqb8J5XXPvpoEEf5FhbOVYRKdHz4vGeZgSwK2I7HM3xZJTjrSTnSedgrW4P/ 94qw== ARC-Authentication-Results: i=1; mx.google.com; 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 q88si5677852pfa.222.2019.03.11.11.58.25; Mon, 11 Mar 2019 11:58:40 -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; 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 S1728616AbfCKS5f (ORCPT + 99 others); Mon, 11 Mar 2019 14:57:35 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:33805 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfCKS4E (ORCPT ); Mon, 11 Mar 2019 14:56:04 -0400 Received: from orion.localdomain ([95.115.159.19]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N2VGj-1gvKJz3OF5-013tZZ; Mon, 11 Mar 2019 19:55:44 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, andrew@aj.id.au, f.fainelli@gmail.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, hoan@os.amperecomputing.com, orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, keguang.zhang@gmail.com, vz@mleia.com, matthias.bgg@gmail.com, thierry.reding@gmail.com, grygorii.strashko@ti.com, ssantosh@kernel.org, khilman@kernel.org, robert.jarzmik@free.fr, yamada.masahiro@socionext.com, jun.nie@linaro.org, shawnguo@kernel.org, linux-gpio@vger.kernel.org, linux-mips@vger.kernel.org, linux-pwm@vger.kernel.org, linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 25/42] drivers: gpio: pxa: use devm_platform_ioremap_resource() Date: Mon, 11 Mar 2019 19:55:04 +0100 Message-Id: <1552330521-4276-25-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1552330521-4276-1-git-send-email-info@metux.net> References: <1552330521-4276-1-git-send-email-info@metux.net> X-Provags-ID: V03:K1:dpXDL7pyvZOBfnJSyM3yHMQtTGOjibUjfyZJaO5v4f+pFvC2ygA PxKs6EF7qrHTskOsmprUrUJfO9zIcvZ7bBg0dmz/BS0vWp1afQ6W6JBA6I6tfRa9TgQrRRb TUFRBCz0R7f1eCZf2Q+ozn54AxO/lPiPvwkhl/F/qFTzjAtX/wJ+2pIQmPLbtp7f8+Bn9E+ c0ad1ASELAGMdzwTskzIQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3QD6+ydyXP8=:vhH6Zf71LWU0zmYJJ+3pi4 GVA1Dyb1rXVJfkXJ9pt2EJRBUnXERfHUOV79HrtA383lIoa74JQMFAbkWHwmYHJGrNHVsKglw GS1ObS2TDfM4u6T0JBe2imaxESOQI0z3wzWe9Tss6UraXWWIr4JuIxXS9cpmBKCISFt8jpz/B cUsXDNd4PdzPiXnHD261Tefbz2kX2iQc1KruZ7FB0fTTFYElThgNNJsZGf9IgdHmGxLdjiQWQ d/NPR3lLW4KI8jg2PztKj7SDEu3RZxne8sm1KAyCImWdIdcXrh71rdx/3YJiMtbgRWGqRrxg+ MHfcvVHtCTae75fmmdDF2bC5S9DjLjElkgDbfX4EwpxCqJGZ+1y70tMxzDlSbnEzRuw6Zp1Pm o2hQwBXGgzPnOz7+HfLjj7npMXYFoFMDtaNKXBeFy1owkNBBHsbUQB7tmBCwcLAYvjwPgKzKH DAF8XT3NmGZgVRlTEmjfEN+mhnjaXKtOzi7FUCY9XwaXfZXpA5rM/sX5lpnUPdjE6C/l5ScNT cX2V+/mfiVK+XwTzuxl20KJMeKZi6BXXJ+1AEbJNermORypmi2YHScU1OzO5eNh4GzhJoy78y ryctHpgajPc01igLsWk7/Cp/UMw23Lw/tkcbzPnfzZx5Qwh32G5GXG6vkQAjlytd8WWinlAGh Ly5L33+NMM3fEsO7GiAVWvMNGUy41+aev/fEpSRF8DS/bW8C1K/P59pjNzNTNQFZA9k0rY4D+ 5PtDS4dlmxNeoBRSQDICIzWtyCeL14lQL1Mk6A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/gpio/gpio-pxa.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index bcc6be4..dd47960 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev) { struct pxa_gpio_chip *pchip; struct pxa_gpio_bank *c; - struct resource *res; struct clk *clk; struct pxa_gpio_platform_data *info; void __iomem *gpio_reg_base; @@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev) pchip->irq0 = irq0; pchip->irq1 = irq1; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - gpio_reg_base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); if (!gpio_reg_base) return -EINVAL; -- 1.9.1