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: qup: fix controller deregistration

Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.

Fixes: 64ff247a978f ("spi: Add Qualcomm QUP SPI controller support")
Cc: stable@vger.kernel.org # 3.15
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-10-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
443e3a00 994b3336

+7 -1
+7 -1
drivers/spi/spi-qup.c
··· 1193 1193 pm_runtime_set_active(dev); 1194 1194 pm_runtime_enable(dev); 1195 1195 1196 - ret = devm_spi_register_controller(dev, host); 1196 + ret = spi_register_controller(host); 1197 1197 if (ret) 1198 1198 goto disable_pm; 1199 1199 ··· 1320 1320 struct spi_qup *controller = spi_controller_get_devdata(host); 1321 1321 int ret; 1322 1322 1323 + spi_controller_get(host); 1324 + 1325 + spi_unregister_controller(host); 1326 + 1323 1327 ret = pm_runtime_get_sync(&pdev->dev); 1324 1328 1325 1329 if (ret >= 0) { ··· 1343 1339 1344 1340 pm_runtime_put_noidle(&pdev->dev); 1345 1341 pm_runtime_disable(&pdev->dev); 1342 + 1343 + spi_controller_put(host); 1346 1344 } 1347 1345 1348 1346 static const struct of_device_id spi_qup_dt_match[] = {