Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1359061imc; Mon, 11 Mar 2019 11:57:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkEEbGyBj1P5ZjSZyYvdFb48Nm/7Tojl5tHPOvlA+IxCR0Z3pZIVN0yChb5bwf2wtL8Lzp X-Received: by 2002:a62:39c5:: with SMTP id u66mr34149115pfj.245.1552330650895; Mon, 11 Mar 2019 11:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552330650; cv=none; d=google.com; s=arc-20160816; b=HGIRO9e5PW4OXUzDKHFV7orC5RDSLpOXp8fFrI2jjmHQAT5JNMJCDPGUbGbooH3mWs A8HrHVoUddDaymoegexx3lGN0xo1+1DG4AIvYw2KrxUqARW47hxbiEOpMr7q4/no0acu HpTsCVV9CqnS/4fy6mwjgSaOVW8QTyCnm6yqWZCD4Gu773VOxxEOTNp03+djIFHOL95P 1OzY+xfiKiwEukQ8qZkavjAUdLF2flnzBVBJNeqsBuPgzwUYyGZDBkYqIbebInW0IvXt lVO+rKb+Op+uXhBKngKWlMU/3qKsdMD40dBxPJZvD21/TlxFummf1b3l11MXd9ogUx/Y rMHA== 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=xiz/DnTh/KQfakoZTt8ET5RvlZOsg67hnIJ4d7vSaSI=; b=ufxUo8upAllySK+IzULGW4dAXrIUTAt863NIB2jUOomVoakWzeuld1B4DbbN3Wgj1P j3dULR9GyLm4JPDH2BCr5MoCKaBYwJ8g2UUhcLy2DfR4p7E7xdXGbra8CIs2eJAyXQSg BW3bOTH7GTuvVNV7Tz2vYsjpVPFo+kHCE+RlhEWxUWN4LGel6vxJwQ9JxcX2EejNMBLY k7Vq3zQFvGFegkjjxEt+5Mf+ksABbZstPzU6IY8yXQR1wOmwgLjKwY0IPfJDRJk+ebZ5 hTvSU2s5L4gpcEHzAIAKkXZ66NwTpIcgayMm8QS8sXgh+N/S8Rc1OVAvyvgFmwJW3/hF UhBg== 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 j6si922063pgf.410.2019.03.11.11.57.14; Mon, 11 Mar 2019 11:57:30 -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 S1728512AbfCKS4a (ORCPT + 99 others); Mon, 11 Mar 2019 14:56:30 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:56663 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728465AbfCKS4P (ORCPT ); Mon, 11 Mar 2019 14:56:15 -0400 Received: from orion.localdomain ([95.115.159.19]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mhl4Q-1gYVBN2hSi-00dphG; Mon, 11 Mar 2019 19:55:57 +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 41/42] drivers: gpio: xlp: devm_platform_ioremap_resource() Date: Mon, 11 Mar 2019 19:55:20 +0100 Message-Id: <1552330521-4276-41-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:Ebl/mDhgO3X+TD45Mmlesnt8aOyo/ItBE1dervu7xKnkqgy9rPl ZU8NQt4OyItW5fhyPOcdT32HSrxTH/WUFYoQeE2jcjvhynzGoJUtIuXQHvvE8oW4M4D5MVW nhTxzdPfFpCucDxvtiHbGyhO2/D9b7Dq1jqvY2azjJfmX3MZ/mswkXKB0W3PFLdvsy6msor Fet53/iryx2U/NRQKq7vg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:NkUzcETFWxI=:ut3VHH5070qjslAcSn/BxX PwyoLovdleZQSvM1uWpAx5OqoaUixmjMDv5jgysJGbPEx+TIMP+0Tfa8q7Gj6rWIdYxALT+Zl 0LQ3tuQNHdZ1IQ0gOr6oWpycFzL+fxckL1hvd/SmzgUctASyAHMHZqjXt2TgRZz3VC5SFNfki sZHmxJJJCI+I9D1Vbo1oJVyKg4VGquA2UleXy57/xylE6WPWpKCYUmUKtZxahj6GxbeMyI1x6 iNdLEx7z0gprvLJZqGc0rWeWxKqHSnAV0Z/1DHUDTA1TT2cVuc+warzdZG2x5tLmUErp47W5K 7xNSyLfHlrAnTgORmwYKSOtreYj7EtKlwu/+q8QU8q+uEzXWLIw/QzaqIBDKBOD9A0f5xzCeP SdCpa1UcQ/m8biTplb1ZeV1R+SwS1qCHIkrR3tLzg586En19m+jejpkpL9mazccIV8bYa9DEg DIJv8kZgMhzvePtlxqUvHfgy2u8KhnoDT1ks3eCpPy0wqoyFDNCjP61vegh2qculXL7bHVw9G HgxDvvYO/5hAjzxWF6y2sJUP3NLzJns5A7aSrqHIjGeW+Bk44TWifKHl96QPykkYH8u1YOcJq PjZCs14P+Z7YnNnrc0ZxEOwr19vXImtcGfj6GAKVZI6aa+veaL4so/5LkqVCt3a/ohXjsEwP+ sK3l7VsItNn7UIbfodkXa6tsJ7WaAMe32+eWYRlDjZf4gu2hFqG71jtMVBYGaN+5IIxt+sArH UnG0Cw383yr7HDYqAHvqZFBliWobeWvpWlK12A== 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-xlp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-xlp.c b/drivers/gpio/gpio-xlp.c index 0a3607f..54d3359 100644 --- a/drivers/gpio/gpio-xlp.c +++ b/drivers/gpio/gpio-xlp.c @@ -290,22 +290,17 @@ static void xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state) static int xlp_gpio_probe(struct platform_device *pdev) { struct gpio_chip *gc; - struct resource *iores; struct xlp_gpio_priv *priv; void __iomem *gpio_base; int irq_base, irq, err; int ngpio; u32 soc_type; - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!iores) - return -ENODEV; - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - gpio_base = devm_ioremap_resource(&pdev->dev, iores); + gpio_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gpio_base)) return PTR_ERR(gpio_base); -- 1.9.1