[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <98924121e59ab3f389ddd413b6d252a8deb889cf.1656341824.git.geert+renesas@glider.be>
Date: Mon, 27 Jun 2022 17:31:08 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Vignesh Raghavendra <vigneshr@...com>,
Sergey Shtylyov <s.shtylyov@....ru>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>
Cc: Mark Brown <broonie@...nel.org>, linux-mtd@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH 1/7] memory: renesas-rpc-if: Always use dev in rpcif_sw_init()
rpcif_sw_init() already has the "dev" parameter pointing to the right
device structure, so there is no need to take a detour through the
platform device.
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
drivers/memory/renesas-rpc-if.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 4316988d791a527f..829b962e8f034bdd 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -263,22 +263,21 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
if (IS_ERR(rpc->base))
return PTR_ERR(rpc->base);
- rpc->regmap = devm_regmap_init(&pdev->dev, NULL, rpc, &rpcif_regmap_config);
+ rpc->regmap = devm_regmap_init(dev, NULL, rpc, &rpcif_regmap_config);
if (IS_ERR(rpc->regmap)) {
- dev_err(&pdev->dev,
- "failed to init regmap for rpcif, error %ld\n",
+ dev_err(dev, "failed to init regmap for rpcif, error %ld\n",
PTR_ERR(rpc->regmap));
return PTR_ERR(rpc->regmap);
}
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
- rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
+ rpc->dirmap = devm_ioremap_resource(dev, res);
if (IS_ERR(rpc->dirmap))
return PTR_ERR(rpc->dirmap);
rpc->size = resource_size(res);
rpc->type = (uintptr_t)of_device_get_match_data(dev);
- rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+ rpc->rstc = devm_reset_control_get_exclusive(dev, NULL);
return PTR_ERR_OR_ZERO(rpc->rstc);
}
--
2.25.1
Powered by blists - more mailing lists