Skip to contentSkip to conversation

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

PATCH New Andrei Coardos 1 participant 1 message Aug 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/spi/spi-hisi-sfc-v3xx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/spi/spi-hisi-sfc-v3xx.c +0 -2
index 7cbcb065bb44..b0da667eefb9 100644
@@ -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);
Signature · 1 line
2.34.1