All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Markus Mayer <mmayer@broadcom.com>,
	Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH 2/7] memory: emif: simplify platform_get_resource()
Date: Tue, 19 Apr 2022 16:28:54 +0200	[thread overview]
Message-ID: <20220419142859.380566-2-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220419142859.380566-1-krzysztof.kozlowski@linaro.org>

Use devm_platform_ioremap_resource() instead of platform_get_resource()
and devm_ioremap_resource().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/memory/emif.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index edf3ba7447ed..6c2a421b86e3 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1107,7 +1107,6 @@ static struct emif_data *__init_or_module get_device_details(
 static int __init_or_module emif_probe(struct platform_device *pdev)
 {
 	struct emif_data	*emif;
-	struct resource		*res;
 	int			irq, ret;
 
 	if (pdev->dev.of_node)
@@ -1126,8 +1125,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
 	emif->dev = &pdev->dev;
 	platform_set_drvdata(pdev, emif);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emif->base = devm_ioremap_resource(emif->dev, res);
+	emif->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(emif->base))
 		goto error;
 
-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Markus Mayer <mmayer@broadcom.com>,
	Broadcom Kernel Team <bcm-kernel-feedback-list@broadcom.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH 2/7] memory: emif: simplify platform_get_resource()
Date: Tue, 19 Apr 2022 16:28:54 +0200	[thread overview]
Message-ID: <20220419142859.380566-2-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220419142859.380566-1-krzysztof.kozlowski@linaro.org>

Use devm_platform_ioremap_resource() instead of platform_get_resource()
and devm_ioremap_resource().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/memory/emif.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index edf3ba7447ed..6c2a421b86e3 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1107,7 +1107,6 @@ static struct emif_data *__init_or_module get_device_details(
 static int __init_or_module emif_probe(struct platform_device *pdev)
 {
 	struct emif_data	*emif;
-	struct resource		*res;
 	int			irq, ret;
 
 	if (pdev->dev.of_node)
@@ -1126,8 +1125,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
 	emif->dev = &pdev->dev;
 	platform_set_drvdata(pdev, emif);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emif->base = devm_ioremap_resource(emif->dev, res);
+	emif->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(emif->base))
 		goto error;
 
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-19 14:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 14:28 [PATCH 1/7] memory: da8xx-ddrctl: simplify platform_get_resource() Krzysztof Kozlowski
2022-04-19 14:28 ` Krzysztof Kozlowski
2022-04-19 14:28 ` Krzysztof Kozlowski [this message]
2022-04-19 14:28   ` [PATCH 2/7] memory: emif: " Krzysztof Kozlowski
2022-04-19 14:28 ` [PATCH 3/7] memory: ti-emif: " Krzysztof Kozlowski
2022-04-19 14:28   ` Krzysztof Kozlowski
2022-04-19 14:28 ` [PATCH 4/7] memory: ti-emif-pm: " Krzysztof Kozlowski
2022-04-19 14:28   ` Krzysztof Kozlowski
2022-04-19 14:28 ` [PATCH 5/7] memory: tegra: mc: " Krzysztof Kozlowski
2022-04-19 14:28   ` Krzysztof Kozlowski
2022-04-19 14:28 ` [PATCH 6/7] memory: brcmstb_dpfe: simplify platform_get_resource_byname() Krzysztof Kozlowski
2022-04-19 14:28   ` Krzysztof Kozlowski
2022-04-26 16:52   ` Markus Mayer
2022-04-26 16:52     ` Markus Mayer
2022-04-19 14:28 ` [PATCH 7/7] memory: renesas-rpc-if: " Krzysztof Kozlowski
2022-04-19 14:28   ` Krzysztof Kozlowski
2022-04-26  7:49 ` [PATCH 1/7] memory: da8xx-ddrctl: simplify platform_get_resource() Krzysztof Kozlowski
2022-04-26  7:49   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220419142859.380566-2-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mmayer@broadcom.com \
    --cc=ssantosh@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.