[PATCH] spi: hisi-sfc-v3xx: removed unneeded call to platform_set_drvdata()
From: Andrei Coardos
Date: Mon Aug 07 2023 - 09:06:39 EST
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@xxxxxxxxx>
---
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