[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211221203916.18588-3-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Tue, 21 Dec 2021 20:39:16 +0000
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
To: Roger Quadros <rogerq@...nel.org>,
Tony Lindgren <tony@...mide.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
linux-omap@...r.kernel.org
Cc: Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
Prabhakar <prabhakar.csengg@...il.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: [PATCH 2/2] memory: omap-gpmc: Make use of the devm_platform_ioremap_resource()
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@...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
Powered by blists - more mailing lists