difos/target/linux/starfive/patches-6.12/0023-spi-pl022-starfive-Enable-spi-to-be-compiled-into-mo.patch
Zoltan HERPAI 8f0f02d297 starfive: 6.12: refresh patches and drop upstreamed ones
- refresh, rebase and reorder patches
 - JH7110 media drivers have been dropped for now
 - JH7110 E24 and mailbox drivers were added
 - JH7100 DMA- and errata-patches have been dropped as they were
   upstreamed

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-06-05 16:39:15 +02:00

38 lines
1 KiB
Diff

From 4ed44e07a80ef61932b1b5012fc7f8a5a7767e41 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 23/55] 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
@@ -2365,7 +2365,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)
{
@@ -2452,7 +2456,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>");