]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: axi-spi-engine: use devm_spi_alloc_host()
authorDavid Lechner <dlechner@baylibre.com>
Fri, 17 Nov 2023 20:12:55 +0000 (14:12 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 20 Nov 2023 13:29:06 +0000 (13:29 +0000)
commite12cd96e8e93044646fdf4b2c9a1de62cfa01e7c
treeca52682af48043239c098deab045cc767dd901f8
parent9e4ce5220eedea2cc440f3961dec1b5122e815b2
spi: axi-spi-engine: use devm_spi_alloc_host()

This modifies the AXI SPI Engine driver to use devm_spi_alloc_host()
instead of spi_alloc_host() to simplify the code a bit.

In addition to simplifying the error paths in the probe function, we
can also remove spi_controller_get/put() calls in the remove function
since devm_spi_alloc_host() sets a flag to no longer decrement the
controller reference count in the spi_unregister_controller() function.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-4-cc59db999b87@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-axi-spi-engine.c