diff mbox series

spi: hisi-sfc-v3xx: removed unneeded call to platform_set_drvdata()

Message ID 20230807130615.17991-1-aboutphysycs@gmail.com (mailing list archive)
State New, archived
Headers show
Series spi: hisi-sfc-v3xx: removed unneeded call to platform_set_drvdata() | expand

Commit Message

Andrei Coardos Aug. 7, 2023, 1:06 p.m. UTC
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 mbox series

Patch

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);