summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorziv.xu <ziv.xu@starfive.com>2023-01-18 10:50:47 +0300
committerHal Feng <hal.feng@starfivetech.com>2024-03-20 12:23:02 +0300
commitbc3638bf33e7e31cf67090f05677670f645ba564 (patch)
tree44bd383297f474a6e30a1af28dc8b8e947ac4c4a
parent87a81f3ad95614e532f2ccf44723217ec2fffbaf (diff)
downloadlinux-bc3638bf33e7e31cf67090f05677670f645ba564.tar.xz
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>
-rw-r--r--drivers/spi/spi-pl022.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index ca499bfa8b44..1420c40fa815 100644
--- 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_of_pl022_driver = {
.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>");