FAILED: patch "[PATCH] spi: tegra20-sflash: fix controller deregistration" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x ad7310e983327f939dd6c4e801eab13238992572
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051258-zigzagged-refusal-42a6@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ad7310e983327f939dd6c4e801eab13238992572 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 10 Apr 2026 10:17:52 +0200
Subject: [PATCH] spi: tegra20-sflash: fix controller deregistration
Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind.
drivers/spi/spi-tegra20-sflash.c +7 -1
@@ -505,7 +505,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)tegra_sflash_writel (tsd, tsd->def_command_reg,SPI_COMMAND );pm_runtime_put (&pdev->dev); - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (ret <0 ) {dev_err (&pdev->dev,"can not register to host err %d\n" , ret); goto exit_pm_disable;
@@ -528,11 +528,17 @@ static void tegra_sflash_remove(struct platform_device *pdev)struct spi_controller *host =platform_get_drvdata (pdev);struct tegra_sflash_data *tsd =spi_controller_get_devdata (host); +spi_controller_get (host); + +spi_unregister_controller (host); +free_irq (tsd->irq, tsd);pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))tegra_sflash_runtime_suspend (&pdev->dev); + +spi_controller_put (host); }#ifdef CONFIG_PM_SLEEP
Sasha Levin
maintainerPATCH 1/1 spi: tegra20-sflash: fix controller deregistration
From: Johan Hovold <[email protected]>
[ Upstream commit ad7310e983327f939dd6c4e801eab13238992572 ]
Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind.
--- drivers/spi/spi-tegra20-sflash.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/spi/spi-tegra20-sflash.c +7 -1
@@ -507,7 +507,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)pm_runtime_put (&pdev->dev); master->dev.of_node = pdev->dev.of_node; - ret =devm_spi_register_master (&pdev->dev, master); + ret =spi_register_master (master);if (ret <0 ) {dev_err (&pdev->dev,"can not register to master err %d\n" , ret); goto exit_pm_disable;
@@ -530,12 +530,18 @@ static int tegra_sflash_remove(struct platform_device *pdev)struct spi_master *master =platform_get_drvdata (pdev);struct tegra_sflash_data *tsd =spi_master_get_devdata (master); +spi_master_get (master); + +spi_unregister_master (master); +free_irq (tsd->irq, tsd);pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))tegra_sflash_runtime_suspend (&pdev->dev); +spi_master_put (master); +return 0 ; }
Signature · 1 line
2.53.0