Skip to contentSkip to conversation

spi: jcore: removed unneeded call to platform_set_drvdata()

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: jcore: 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-jcore.c | 1 -
 1 file changed, 1 deletion(-)
drivers/spi/spi-jcore.c +0 -1
index c42a3358e8c9..f627877ae85b 100644
@@ -162,7 +162,6 @@ static int jcore_spi_probe(struct platform_device *pdev)
 
 	hw = spi_master_get_devdata(master);
 	hw->master = master;
-	platform_set_drvdata(pdev, hw);
 
 	/* Find and map our resources */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Signature · 1 line
2.34.1