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

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

Fixes: 754ce4f29937 ("[PATCH] SPI: atmel_spi driver")
Cc: stable@vger.kernel.org # 2.6.21
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
8d4de97e 9acecc9b

+7 -1
+7 -1
drivers/spi/spi-atmel.c
··· 1654 1654 pm_runtime_set_active(&pdev->dev); 1655 1655 pm_runtime_enable(&pdev->dev); 1656 1656 1657 - ret = devm_spi_register_controller(&pdev->dev, host); 1657 + ret = spi_register_controller(host); 1658 1658 if (ret) 1659 1659 goto out_free_dma; 1660 1660 ··· 1688 1688 struct spi_controller *host = platform_get_drvdata(pdev); 1689 1689 struct atmel_spi *as = spi_controller_get_devdata(host); 1690 1690 1691 + spi_controller_get(host); 1692 + 1691 1693 pm_runtime_get_sync(&pdev->dev); 1694 + 1695 + spi_unregister_controller(host); 1692 1696 1693 1697 /* reset the hardware and block queue progress */ 1694 1698 if (as->use_dma) { ··· 1720 1716 1721 1717 pm_runtime_put_noidle(&pdev->dev); 1722 1718 pm_runtime_disable(&pdev->dev); 1719 + 1720 + spi_controller_put(host); 1723 1721 } 1724 1722 1725 1723 static int atmel_spi_runtime_suspend(struct device *dev)