Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.32
Manually refreshed[1]:
starfive/patches-6.18/0020-spi-pl022-starfive-Add-platform-bus-register-to-adap.patch
starfive/patches-6.18/0022-spi-pl022-starfive-fix-the-problem-of-spi-overlay-re.patch
starfive/patches-6.18/0031-spi-pl022-starfive-fix-controller-deregistration.patch
No patches automatically rebased via update_kernel.sh
Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc
1. 72360971c1
Co-authored-by: Zhihao Xu <ngc7331@outlook.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
From: Zhihao Xu <ngc7331@outlook.com>
|
|
Date: Mon, 18 May 2026 14:03:55 +0800
|
|
Subject: [PATCH] spi-pl022-starfive: fix controller deregistration
|
|
|
|
Use manually managed spi_register_controller instead of device managed.
|
|
|
|
Link: https://lore.kernel.org/all/20260410081757.503099-1-johan@kernel.org/
|
|
|
|
Signed-off-by: Zhihao Xu <ngc7331@outlook.com>
|
|
--- a/drivers/spi/spi-pl022.c
|
|
+++ b/drivers/spi/spi-pl022.c
|
|
@@ -1991,7 +1991,7 @@ static int pl022_platform_probe(struct p
|
|
/* Register with the SPI framework */
|
|
dev_set_drvdata(dev, pl022);
|
|
|
|
- status = devm_spi_register_controller(dev, host);
|
|
+ status = spi_register_controller(host);
|
|
if (status != 0) {
|
|
dev_err(dev,
|
|
"probe - problem registering spi host\n");
|
|
@@ -2429,6 +2429,10 @@ static void starfive_of_pl022_remove(str
|
|
if (!pl022)
|
|
return;
|
|
|
|
+ spi_controller_get(pl022->host);
|
|
+
|
|
+ spi_unregister_controller(pl022->host);
|
|
+
|
|
pm_runtime_get_sync(&pdev->dev);
|
|
pm_runtime_get_noresume(&pdev->dev);
|
|
|
|
@@ -2441,6 +2445,8 @@ static void starfive_of_pl022_remove(str
|
|
pm_runtime_set_suspended(&pdev->dev);
|
|
pm_runtime_put_noidle(&pdev->dev);
|
|
dev_pm_domain_detach(&pdev->dev, true);
|
|
+
|
|
+ spi_controller_put(pl022->host);
|
|
}
|
|
|
|
static const struct of_device_id starfive_of_pl022_match[] = {
|