public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] clk: sifive: Allow building the driver as a module
       [not found] <20230725004248.381868-1-samuel.holland@sifive.com>
@ 2023-07-25  0:42 ` Samuel Holland
  2023-10-24  3:30   ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2023-07-25  0:42 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Emil Renner Berthing, Samuel Holland, Conor Dooley,
	Palmer Dabbelt, Paul Walmsley, Yang Li, linux-clk, linux-kernel,
	linux-riscv

This can reduce the kernel image size in multiplatform configurations.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---

Changes in v2:
 - Add MODULE_AUTHOR and MODULE_DESCRIPTION

 drivers/clk/sifive/Kconfig       |  2 +-
 drivers/clk/sifive/sifive-prci.c | 10 +++++-----
 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 e317f3454e93..09a76248a710 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_device.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");
-- 
2.40.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 2/2] clk: sifive: Allow building the driver as a module
  2023-07-25  0:42 ` [PATCH v2 2/2] clk: sifive: Allow building the driver as a module Samuel Holland
@ 2023-10-24  3:30   ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-10-24  3:30 UTC (permalink / raw)
  To: Michael Turquette, Samuel Holland
  Cc: linux-kernel, Conor Dooley, Yang Li, Paul Walmsley,
	Palmer Dabbelt, linux-riscv, Emil Renner Berthing, linux-clk

Quoting Samuel Holland (2023-07-24 17:42:48)
> This can reduce the kernel image size in multiplatform configurations.
> 
> Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
> ---

Applied to clk-next

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-24  3:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230725004248.381868-1-samuel.holland@sifive.com>
2023-07-25  0:42 ` [PATCH v2 2/2] clk: sifive: Allow building the driver as a module Samuel Holland
2023-10-24  3:30   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox