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>
This commit is contained in:
David Lechner 2024-06-26 14:45:17 -05:00 committed by Mark Brown
parent 1420139945
commit 89c2657429
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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[] = {