Files
openwrt-master/target/linux/starfive/patches-6.6/0104-spi-pl022-starfive-Enable-spi-to-be-compiled-into-mo.patch
domenico c06fb25d1f
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 14:35:53 +02:00

39 lines
1.0 KiB
Diff

From 11a917bf429a5714e34584f90ab1ac376d399d8f Mon Sep 17 00:00:00 2001
From: "ziv.xu" <ziv.xu@starfive.com>
Date: Wed, 18 Jan 2023 15:50:47 +0800
Subject: [PATCH 104/116] spi-pl022-starfive:Enable spi to be compiled into
modules
Enable spi to be compiled into modules
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
---
drivers/spi/spi-pl022.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2633,7 +2633,11 @@ static int __init pl022_init(void)
{
return amba_driver_register(&pl022_driver);
}
+#if !IS_MODULE(CONFIG_SPI_PL022)
subsys_initcall(pl022_init);
+#else
+module_init(pl022_init);
+#endif
static void __exit pl022_exit(void)
{
@@ -2723,7 +2727,9 @@ static struct platform_driver starfive_o
.remove = starfive_of_pl022_remove,
};
+#if !IS_MODULE(CONFIG_SPI_PL022)
module_platform_driver(starfive_of_pl022_driver);
+#endif
/* platform register end */
MODULE_AUTHOR("xingyu.wu <xingyu.wu@starfivetech.com>");