All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
To: Roger Quadros <rogerq@kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	linux-omap@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: [PATCH 2/2] memory: omap-gpmc: Make use of the devm_platform_ioremap_resource()
Date: Tue, 21 Dec 2021 20:39:16 +0000	[thread overview]
Message-ID: <20211221203916.18588-3-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20211221203916.18588-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/memory/omap-gpmc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 56f401ba53a5..582fe102f923 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2492,7 +2492,6 @@ static int gpmc_probe(struct platform_device *pdev)
 {
 	int rc;
 	u32 l;
-	struct resource *res;
 	struct gpmc_device *gpmc;
 
 	gpmc = devm_kzalloc(&pdev->dev, sizeof(*gpmc), GFP_KERNEL);
@@ -2502,11 +2501,7 @@ static int gpmc_probe(struct platform_device *pdev)
 	gpmc->dev = &pdev->dev;
 	platform_set_drvdata(pdev, gpmc);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
-	gpmc_base = devm_ioremap_resource(&pdev->dev, res);
+	gpmc_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(gpmc_base))
 		return PTR_ERR(gpmc_base);
 
-- 
2.17.1


  parent reply	other threads:[~2021-12-21 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 20:39 [PATCH 0/2] memory: omap-gpmc: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-21 20:39 ` [PATCH 1/2] " Lad Prabhakar
2021-12-22 10:28   ` Roger Quadros
2021-12-22 11:19   ` (subset) " Krzysztof Kozlowski
2021-12-21 20:39 ` Lad Prabhakar [this message]
2021-12-22 10:30   ` [PATCH 2/2] memory: omap-gpmc: Make use of the devm_platform_ioremap_resource() Roger Quadros
2021-12-22 10:43     ` Lad, Prabhakar

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=20211221203916.18588-3-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=tony@atomide.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.