mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 12:40:16 +04:00
0eaee44870
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.90
All patches are automatically refreshed.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23444
(cherry picked from commit 979bad2629)
Link: https://github.com/openwrt/openwrt/pull/23538
[Updated and added starfive patches for spi-pl022]
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
|
|
@@ -1994,7 +1994,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");
|
|
@@ -2432,6 +2432,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);
|
|
|
|
@@ -2444,6 +2448,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[] = {
|