diff options
author | David Lechner <dlechner@baylibre.com> | 2024-06-26 14:45:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-06-27 12:18:03 +0100 |
commit | 89c2657429c4822a2697077bbb3a8d126d826ced (patch) | |
tree | 29daf7b37753370f4ae11210b3b43029c038bb7a /drivers/spi/spi-axi-spi-engine.c | |
parent | 14201399457ce5314224c2898c936bfaa5849fcb (diff) |
spi: axi-spi-engine: remove platform_set_drvdata()
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@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240626-spi-axi-spi-engine-remove-drvdata-v1-1-1752e372dd5d@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-axi-spi-engine.c')
-rw-r--r-- | drivers/spi/spi-axi-spi-engine.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c index 3231f67ae265..03588fac9215 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -690,13 +690,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[] = { |