Commit 89c26574 authored by David Lechner's avatar David Lechner Committed by Mark Brown

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: default avatarDavid Lechner <dlechner@baylibre.com>
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240626-spi-axi-spi-engine-remove-drvdata-v1-1-1752e372dd5d@baylibre.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 14201399
......@@ -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[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment