Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Samuel Holland and committed by
Stephen Boyd
c8e1d8ae ee58d6a1

+6 -6
+1 -1
drivers/clk/sifive/Kconfig
··· 10 10 if CLK_SIFIVE 11 11 12 12 config CLK_SIFIVE_PRCI 13 - bool "PRCI driver for SiFive SoCs" 13 + tristate "PRCI driver for SiFive SoCs" 14 14 default ARCH_SIFIVE 15 15 select RESET_CONTROLLER 16 16 select RESET_SIMPLE
+5 -5
drivers/clk/sifive/sifive-prci.c
··· 7 7 #include <linux/clkdev.h> 8 8 #include <linux/delay.h> 9 9 #include <linux/io.h> 10 + #include <linux/module.h> 10 11 #include <linux/of.h> 11 12 #include "sifive-prci.h" 12 13 #include "fu540-prci.h" ··· 619 618 }, 620 619 .probe = sifive_prci_probe, 621 620 }; 621 + module_platform_driver(sifive_prci_driver); 622 622 623 - static int __init sifive_prci_init(void) 624 - { 625 - return platform_driver_register(&sifive_prci_driver); 626 - } 627 - core_initcall(sifive_prci_init); 623 + MODULE_AUTHOR("Paul Walmsley <paul.walmsley@sifive.com>"); 624 + MODULE_DESCRIPTION("SiFive Power Reset Clock Interface (PRCI) driver"); 625 + MODULE_LICENSE("GPL");