summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2023-07-24 17:42:48 -0700
committerStephen Boyd <sboyd@kernel.org>2023-10-23 20:27:46 -0700
commitc8e1d8ae6aba7521d96d5cde21384edde1f06d3d (patch)
tree9ebc4e5103de7fbdc422d16fdf731bc3a8ed9a12 /drivers/clk
parentee58d6a115cefd7e8065eb469788dafa00b999d1 (diff)
clk: sifive: Allow building the driver as a module
This can reduce the kernel image size in multiplatform configurations. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20230725004248.381868-2-samuel.holland@sifive.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/sifive/Kconfig2
-rw-r--r--drivers/clk/sifive/sifive-prci.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/clk/sifive/Kconfig b/drivers/clk/sifive/Kconfig
index 2322f634a910..49597d95602e 100644
--- a/drivers/clk/sifive/Kconfig
+++ b/drivers/clk/sifive/Kconfig
@@ -10,7 +10,7 @@ menuconfig CLK_SIFIVE
if CLK_SIFIVE
config CLK_SIFIVE_PRCI
- bool "PRCI driver for SiFive SoCs"
+ tristate "PRCI driver for SiFive SoCs"
default ARCH_SIFIVE
select RESET_CONTROLLER
select RESET_SIMPLE
diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
index af81eb835bc2..25b8e1a80ddc 100644
--- a/drivers/clk/sifive/sifive-prci.c
+++ b/drivers/clk/sifive/sifive-prci.c
@@ -7,6 +7,7 @@
#include <linux/clkdev.h>
#include <linux/delay.h>
#include <linux/io.h>
+#include <linux/module.h>
#include <linux/of.h>
#include "sifive-prci.h"
#include "fu540-prci.h"
@@ -618,9 +619,8 @@ static struct platform_driver sifive_prci_driver = {
},
.probe = sifive_prci_probe,
};
+module_platform_driver(sifive_prci_driver);
-static int __init sifive_prci_init(void)
-{
- return platform_driver_register(&sifive_prci_driver);
-}
-core_initcall(sifive_prci_init);
+MODULE_AUTHOR("Paul Walmsley <paul.walmsley@sifive.com>");
+MODULE_DESCRIPTION("SiFive Power Reset Clock Interface (PRCI) driver");
+MODULE_LICENSE("GPL");