Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1359371imc; Mon, 11 Mar 2019 11:57:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8+kl1b7LZUj7uMbrpBj4nwoBLHe/8uRmuHrBYT1YtxRfOsTi+uX+3QLTbagnLf1ttIRM8 X-Received: by 2002:aa7:8508:: with SMTP id v8mr34342901pfn.14.1552330677173; Mon, 11 Mar 2019 11:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552330677; cv=none; d=google.com; s=arc-20160816; b=gckEmoMDl/qH3LITBNL977bjv7sFd3E5AFmomMwoIyGDKIFNVpNDd4LN0P94mJM4P2 9LtFhwIxSzx6F0JL7FY9XVFLaAnUY1mQphgoJAEu0nb7cpj29SRA1Z+8GSTv7YVbgnpx I4ERr/n4GCsO/UXxAar45DGkrF+CLz1Kx0AgYYeicvobj4bYVww2/ySQTsa/JRs3N2mV oIxkBiIKfnncTHigVf+Nqp1Big+S+lue1bAzzehCMCqAApu4IFRn78jC6Ie2/CVhI0D5 2QBBL5FLynlHBycDu+rduuKkykbLxL3u7XmAYAvqhf4fqKxTvIzw0qpicenVdqVh8p+o +fZA== 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=Jcknd0DwJ5/84WVLiEsr26u5zMvF2Ee1cYq/PLQ59Ec=; b=y3ZlxWYvWMTUUt3hQn9kfWn4b95+paR/QL0RZai26WS001rW9hPnPBMbTXPsVEoOza hNTqumgBrwDJk/Ds56ztzL0gQJdFXGcr5uznpubtEo/YgOFg3OrpFtLLHJxyNlPpVFzC 5V/wC4k7j8BR8WgJ8Y4kdoEYnJqlBranY0IalBDNaQ4n64sdztyZ60KURupD0r+KgGhg LVYVgxbPTznuZtNkh5P51ZK629lYJOk+LUKTDZruOuyXkwB8b7KukrPvvxEvQYMih6hI SYjwpROz4M5yqnnYhSXZg80uSvm533Esix8FBzA34sK6/jeJQg+mAwv7sPxHTZvkeMMp vzXw== 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 cv7si6175883plb.322.2019.03.11.11.57.41; Mon, 11 Mar 2019 11:57:57 -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 S1728349AbfCKSz7 (ORCPT + 99 others); Mon, 11 Mar 2019 14:55:59 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:60591 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbfCKSzq (ORCPT ); Mon, 11 Mar 2019 14:55:46 -0400 Received: from orion.localdomain ([95.115.159.19]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MauFB-1gVzwD1NoR-00cR3V; Mon, 11 Mar 2019 19:55:26 +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 02/42] drivers: gpio: amdpt: use devm_platform_ioremap_resource() Date: Mon, 11 Mar 2019 19:54:41 +0100 Message-Id: <1552330521-4276-2-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:t7CtsQ6196NUwn5AFANedHt5v9gF4mlhPz7HwxccuT62LP/FYC6 R6DbwjnsyOAR53nEwDDOtCynB44mzcscN8kUf4o2M58AE5n1AghFS4Sc/Ft4tZlt+4eZCvo aSofRSDj3JREBpin32lQt3cN+fIT/VUAdyBoVRbQBZBMJV1e4J6aAbgbVJIsx4261NhTT+3 SD39WRbgYcMUJmnrDnBmg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bUfE33xEpxs=:pTsoENNS7szHsdIGMkPYSI pQm7fewthpFAWB1DJWYebJfjXEoJb/cDcaDUnhN5VlkX/D23gUn0JBvrjZgUK24bxNAgPwNoj PsUgP+4Vzio6UmXXIGsSfKGo9shyQW9Ah7RvtTvOJLiRy7tVtGJX9wK3vUB4NvTKT+htGmqxu kzuyKFZYUhXduD2mlcwMdfwG3Ye7EAZvFIrGdhqjCSAaupf4cQGS4w9OnrmMp2mMfAtpYfsXT YhWH+lwKIpVeuo5yKaSBryOom96+Pd/34ECqxVxkiXMCr1OrF9+tt85zzhLoJubLwsIbweAAt kiTHABS4GpZZhZCxbUZ7zCNflvXiem3ap997Jq9xJS5ZdtU4TTbg/ZjdvhVKObToViGiNZqyP /H4TyZYl0+35AQe88Y4dX1cEtKIjVAFT2BtD2yZY+Chn1rE+ITDa7MHkYtPlhykMwroCRBKfp Yh5bvW39ImG70gVmiuQyRqSAVmtkZVD0YKCwdUG3sQsVfaRwMAiye2L/j3x0iabfZNKFD8YcK gcOkWEIUlkPf5QFVh/qJJ1psrfvkQopb/sJE8Zs6jVqqCZOyf/md0rbM0KaFD0tXc8O4qRj+J Z64Ls5HV5XGFiElfPf8cmanEQz0SIm9YR6nN3e3PcFwQ4nTcEUjp6nXDH4bDvC0QuvNoiBGYO JvSnVbdtm9wuOCsWcZmpG9/Vb9nefJBSa5/g3el26qDbkw1RgkVSdUdHETcKDEmFylncXByc0 YJhpi5ZsGUyPGrpoTQVWboScA2C2zMig6Y9FxA== 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-amdpt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c index 9b78dc8..1ffd7c2 100644 --- a/drivers/gpio/gpio-amdpt.c +++ b/drivers/gpio/gpio-amdpt.c @@ -78,7 +78,6 @@ static int pt_gpio_probe(struct platform_device *pdev) struct acpi_device *acpi_dev; acpi_handle handle = ACPI_HANDLE(dev); struct pt_gpio_chip *pt_gpio; - struct resource *res_mem; int ret = 0; if (acpi_bus_get_device(handle, &acpi_dev)) { @@ -90,12 +89,7 @@ static int pt_gpio_probe(struct platform_device *pdev) if (!pt_gpio) return -ENOMEM; - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res_mem) { - dev_err(&pdev->dev, "Failed to get MMIO resource for PT GPIO.\n"); - return -EINVAL; - } - pt_gpio->reg_base = devm_ioremap_resource(dev, res_mem); + pt_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pt_gpio->reg_base)) { dev_err(&pdev->dev, "Failed to map MMIO resource for PT GPIO.\n"); return PTR_ERR(pt_gpio->reg_base); -- 1.9.1