Skip to contentSkip to conversation

FAILED: patch "[PATCH] spi: mxic: fix controller deregistration" failed to apply to 5.10-stable tree

PATCH [email protected] 1 participant 1 message May 15

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x adbc595e272052181d40ec307a4c5ba98571b0fe
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051509-stir-multitude-96f9@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From adbc595e272052181d40ec307a4c5ba98571b0fe Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Tue, 14 Apr 2026 15:43:16 +0200
Subject: [PATCH] spi: mxic: fix controller deregistration

Make sure to deregister the controller before disabling underlying resources like clocks (via runtime pm) during driver unbind.

Fixes b942d80b0a39 ("spi: Add MXIC controller driver")
Cc [email protected] # 5.0: cc53711b2191
Cc Mason Yang <[email protected]>
drivers/spi/spi-mxic.c +2 -1
index f9369c69911c..b0e7fc828a50 100644
@@ -832,9 +832,10 @@ static void mxic_spi_remove(struct platform_device *pdev)
 	struct spi_controller *host = platform_get_drvdata(pdev);
 	struct mxic_spi *mxic = spi_controller_get_devdata(host);
 
+	spi_unregister_controller(host);
+
 	pm_runtime_disable(&pdev->dev);
 	mxic_spi_mem_ecc_remove(mxic);
-	spi_unregister_controller(host);
 }
 
 static const struct of_device_id mxic_spi_of_ids[] = {