[PATCH] spi: axi-spi-engine: remove platform_set_drvdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



platform_get_drvdata() is never called in the AXI SPI Engine driver, so
platform_set_drvdata() is not needed. Remove it. This also lets us
avoid the final error check in the probe function.

Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx>
---
 drivers/spi/spi-axi-spi-engine.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
index 103a68bd4f19..447e5a962dee 100644
--- a/drivers/spi/spi-axi-spi-engine.c
+++ b/drivers/spi/spi-axi-spi-engine.c
@@ -700,13 +700,7 @@ static int spi_engine_probe(struct platform_device *pdev)
 	if (host->max_speed_hz == 0)
 		return dev_err_probe(&pdev->dev, -EINVAL, "spi_clk rate is 0");
 
-	ret = devm_spi_register_controller(&pdev->dev, host);
-	if (ret)
-		return ret;
-
-	platform_set_drvdata(pdev, host);
-
-	return 0;
+	return devm_spi_register_controller(&pdev->dev, host);
 }
 
 static const struct of_device_id spi_engine_match_table[] = {

---
base-commit: f66ed82666bc582434d57359d2d83d6f40c925e4
change-id: 20240626-spi-axi-spi-engine-remove-drvdata-cf390daaa2ab





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux