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 4/7] memory: ti-emif-pm: simplify platform_get_resource()
Date: Tue, 19 Apr 2022 16:28:56 +0200	[thread overview]
Message-ID: <20220419142859.380566-4-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220419142859.380566-1-krzysztof.kozlowski@linaro.org>

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

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

diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
index 179fec2da56d..31d6266f008c 100644
--- a/drivers/memory/ti-emif-pm.c
+++ b/drivers/memory/ti-emif-pm.c
@@ -290,9 +290,9 @@ static int ti_emif_probe(struct platform_device *pdev)
 
 	emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emif_data->pm_data.ti_emif_base_addr_virt = devm_ioremap_resource(dev,
-									  res);
+	emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev,
+											   0,
+											   &res);
 	if (IS_ERR(emif_data->pm_data.ti_emif_base_addr_virt)) {
 		ret = PTR_ERR(emif_data->pm_data.ti_emif_base_addr_virt);
 		return ret;
-- 
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 4/7] memory: ti-emif-pm: simplify platform_get_resource()
Date: Tue, 19 Apr 2022 16:28:56 +0200	[thread overview]
Message-ID: <20220419142859.380566-4-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220419142859.380566-1-krzysztof.kozlowski@linaro.org>

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

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

diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
index 179fec2da56d..31d6266f008c 100644
--- a/drivers/memory/ti-emif-pm.c
+++ b/drivers/memory/ti-emif-pm.c
@@ -290,9 +290,9 @@ static int ti_emif_probe(struct platform_device *pdev)
 
 	emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emif_data->pm_data.ti_emif_base_addr_virt = devm_ioremap_resource(dev,
-									  res);
+	emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev,
+											   0,
+											   &res);
 	if (IS_ERR(emif_data->pm_data.ti_emif_base_addr_virt)) {
 		ret = PTR_ERR(emif_data->pm_data.ti_emif_base_addr_virt);
 		return ret;
-- 
2.32.0


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

  parent 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 ` [PATCH 2/7] memory: emif: " Krzysztof Kozlowski
2022-04-19 14:28   ` 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 ` Krzysztof Kozlowski [this message]
2022-04-19 14:28   ` [PATCH 4/7] memory: ti-emif-pm: " 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-4-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.