* [PATCH] spi: hisi-sfc-v3xx: removed unneeded call to platform_set_drvdata()
@ 2023-08-07 13:06 Andrei Coardos
0 siblings, 0 replies; only message in thread
From: Andrei Coardos @ 2023-08-07 13:06 UTC (permalink / raw)
To: linux-kernel, linux-spi; +Cc: broonie, f.fangjian, alex, Andrei Coardos
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
drivers/spi/spi-hisi-sfc-v3xx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/spi-hisi-sfc-v3xx.c b/drivers/spi/spi-hisi-sfc-v3xx.c
index 7cbcb065bb44..b0da667eefb9 100644
--- a/drivers/spi/spi-hisi-sfc-v3xx.c
+++ b/drivers/spi/spi-hisi-sfc-v3xx.c
@@ -443,8 +443,6 @@ static int hisi_sfc_v3xx_probe(struct platform_device *pdev)
host = spi_controller_get_devdata(ctlr);
host->dev = dev;
- platform_set_drvdata(pdev, host);
-
host->regbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->regbase)) {
ret = PTR_ERR(host->regbase);
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-07 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 13:06 [PATCH] spi: hisi-sfc-v3xx: removed unneeded call to platform_set_drvdata() Andrei Coardos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).