Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: cadence-quadspi: fix controller deregistration

Make sure to deregister the controller before dropping the reference
count that allows new operations to start to allow SPI drivers to do I/O
during deregistration.

Fixes: 7446284023e8 ("spi: cadence-quadspi: Implement refcount to handle unbind during busy")
Cc: stable@vger.kernel.org # 6.17
Cc: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
964ee979 666fa7e9

+2 -2
+2 -2
drivers/spi/spi-cadence-quadspi.c
··· 2020 2020 2021 2021 ddata = of_device_get_match_data(dev); 2022 2022 2023 + spi_unregister_controller(cqspi->host); 2024 + 2023 2025 refcount_set(&cqspi->refcount, 0); 2024 2026 2025 2027 if (!refcount_dec_and_test(&cqspi->inflight_ops)) 2026 2028 cqspi_wait_idle(cqspi); 2027 - 2028 - spi_unregister_controller(cqspi->host); 2029 2029 2030 2030 if (cqspi->rx_chan) 2031 2031 dma_release_channel(cqspi->rx_chan);