FAILED: patch "[PATCH] spi: mxs: fix controller deregistration" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 8b0d0011af20fb547aa67a1cefbf320992fd5e92
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051540-overlying-striving-3883@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8b0d0011af20fb547aa67a1cefbf320992fd5e92 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 10 Apr 2026 10:17:33 +0200
Subject: [PATCH] spi: mxs: fix controller deregistration
Make sure to deregister the controller before releasing underlying resources like DMA during driver unbind.
drivers/spi/spi-mxs.c +7 -1
@@ -619,7 +619,7 @@ static int mxs_spi_probe(struct platform_device *pdev)if (ret) goto out_pm_runtime_put; - ret =devm_spi_register_controller (&pdev->dev, host); + ret =spi_register_controller (host);if (ret) {dev_err (&pdev->dev,"Cannot register SPI host, %d\n" , ret); goto out_pm_runtime_put;
@@ -650,11 +650,17 @@ static void mxs_spi_remove(struct platform_device *pdev) spi =spi_controller_get_devdata (host); ssp = &spi->ssp; +spi_controller_get (host); + +spi_unregister_controller (host); +pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))mxs_spi_runtime_suspend (&pdev->dev);dma_release_channel (ssp->dmach); + +spi_controller_put (host); }static struct platform_driver mxs_spi_driver = {