FAILED: patch "[PATCH] spi: pl022: 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 994b33366be9148240690e3e94bffe17c4d89458
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051529-devouring-sliver-429e@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 994b33366be9148240690e3e94bffe17c4d89458 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 10 Apr 2026 10:17:38 +0200
Subject: [PATCH] spi: pl022: fix controller deregistration
Make sure to deregister the controller before releasing underlying resources like DMA during driver unbind.
drivers/spi/spi-pl022.c +7 -1
@@ -1956,7 +1956,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)/* Register with the SPI framework */ amba_set_drvdata (adev, pl022); - status =devm_spi_register_controller (&adev->dev, host); + status =spi_register_controller (host);if (status !=0 ) {dev_err_probe (&adev->dev, status,"problem registering spi host\n" );
@@ -1997,6 +1997,10 @@ pl022_remove(struct amba_device *adev)if (!pl022)return ; +spi_controller_get (pl022->host); + +spi_unregister_controller (pl022->host); +/* * undo pm_runtime_put() in probe. I assume that we're not * accessing the primecell here.
@@ -2008,6 +2012,8 @@ pl022_remove(struct amba_device *adev)pl022_dma_remove (pl022);amba_release_regions (adev); + +spi_controller_put (pl022->host); }#ifdef CONFIG_PM_SLEEP