Skip to content

Commit 89c2657

Browse files
dlechbroonie
authored andcommitted
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 <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/20240626-spi-axi-spi-engine-remove-drvdata-v1-1-1752e372dd5d@baylibre.com Signed-off-by: Mark Brown <[email protected]>
1 parent 1420139 commit 89c2657

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/spi/spi-axi-spi-engine.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -690,13 +690,7 @@ static int spi_engine_probe(struct platform_device *pdev)
690690
if (host->max_speed_hz == 0)
691691
return dev_err_probe(&pdev->dev, -EINVAL, "spi_clk rate is 0");
692692

693-
ret = devm_spi_register_controller(&pdev->dev, host);
694-
if (ret)
695-
return ret;
696-
697-
platform_set_drvdata(pdev, host);
698-
699-
return 0;
693+
return devm_spi_register_controller(&pdev->dev, host);
700694
}
701695

702696
static const struct of_device_id spi_engine_match_table[] = {

0 commit comments

Comments
 (0)