FAILED: patch "[PATCH] spi: uniphier: fix controller deregistration" failed to apply to 5.15-stable tree
Subsystems (3)
[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 0245435f777264ac45945ed2f325dd095a41d1af
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051214-aching-old-35ed@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0245435f777264ac45945ed2f325dd095a41d1af Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 10 Apr 2026 10:17:54 +0200
Subject: [PATCH] spi: uniphier: fix controller deregistration
Make sure to deregister the controller before releasing underlying resources like DMA during driver unbind.
Note that clocks were also disabled before the recent commit fdca270f8f87 ("spi: uniphier: Simplify clock handling with devm_clk_get_enabled()").
drivers/spi/spi-uniphier.c +7 -1
@@ -746,7 +746,7 @@ static int uniphier_spi_probe(struct platform_device *pdev) host->max_dma_len =min (dma_tx_burst, dma_rx_burst); - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (ret) goto out_release_dma;
@@ -771,10 +771,16 @@ static void uniphier_spi_remove(struct platform_device *pdev) {struct spi_controller *host =platform_get_drvdata (pdev); +spi_controller_get (host); + +spi_unregister_controller (host); +if (host->dma_tx)dma_release_channel (host->dma_tx);if (host->dma_rx)dma_release_channel (host->dma_rx); + +spi_controller_put (host); }static const struct of_device_id uniphier_spi_match[] = {
Sasha Levin
maintainerPATCH 1/1 spi: uniphier: fix controller deregistration
From: Johan Hovold <[email protected]>
[ Upstream commit 0245435f777264ac45945ed2f325dd095a41d1af ]
Make sure to deregister the controller before releasing underlying resources like DMA during driver unbind.
Note that clocks were also disabled before the recent commit fdca270f8f87 ("spi: uniphier: Simplify clock handling with devm_clk_get_enabled()").
--- drivers/spi/spi-uniphier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/spi/spi-uniphier.c +7 -1
@@ -751,7 +751,7 @@ static int uniphier_spi_probe(struct platform_device *pdev) master->max_dma_len =min (dma_tx_burst, dma_rx_burst); - ret =devm_spi_register_master (&pdev->dev, master); + ret =spi_register_master (master);if (ret) goto out_release_dma;
@@ -780,6 +780,10 @@ static int uniphier_spi_remove(struct platform_device *pdev)struct spi_master *master =platform_get_drvdata (pdev);struct uniphier_spi_priv *priv =spi_master_get_devdata (master); +spi_master_get (master); + +spi_unregister_master (master); +if (master->dma_tx)dma_release_channel (master->dma_tx);if (master->dma_rx)
@@ -787,6 +791,8 @@ static int uniphier_spi_remove(struct platform_device *pdev)clk_disable_unprepare (priv->clk); +spi_master_put (master); +return 0 ; }
Signature · 1 line
2.53.0