From 75b272bd093bd0df5d3052b39a8f0dae45e86af5 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 29 Apr 2020 15:58:16 -0500 Subject: clk: vexpress-osc: Support building as a module Enable building the vexpress-osc clock driver as a module. Cc: Linus Walleij Cc: Liviu Dudau Cc: Lorenzo Pieralisi Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Reviewed-by: Sudeep Holla Reviewed-by: Stephen Boyd Signed-off-by: Rob Herring --- drivers/clk/versatile/Kconfig | 2 +- drivers/clk/versatile/clk-vexpress-osc.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'drivers/clk') diff --git a/drivers/clk/versatile/Kconfig b/drivers/clk/versatile/Kconfig index a47dd6c86d2e..a0ed412e8396 100644 --- a/drivers/clk/versatile/Kconfig +++ b/drivers/clk/versatile/Kconfig @@ -23,7 +23,7 @@ config CLK_SP810 of the ARM SP810 System Controller cell. config CLK_VEXPRESS_OSC - bool "Clock driver for Versatile Express OSC clock generators" + tristate "Clock driver for Versatile Express OSC clock generators" depends on VEXPRESS_CONFIG select REGMAP_MMIO default y if ARCH_VEXPRESS diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index 5bb1d5a714d0..b2b32fa2d7c3 100644 --- a/drivers/clk/versatile/clk-vexpress-osc.c +++ b/drivers/clk/versatile/clk-vexpress-osc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ static const struct of_device_id vexpress_osc_of_match[] = { { .compatible = "arm,vexpress-osc", }, {} }; +MODULE_DEVICE_TABLE(of, vexpress_osc_of_match); static struct platform_driver vexpress_osc_driver = { .driver = { @@ -116,9 +118,5 @@ static struct platform_driver vexpress_osc_driver = { }, .probe = vexpress_osc_probe, }; - -static int __init vexpress_osc_init(void) -{ - return platform_driver_register(&vexpress_osc_driver); -} -core_initcall(vexpress_osc_init); +module_platform_driver(vexpress_osc_driver); +MODULE_LICENSE("GPL v2"); -- cgit v1.2.3-58-ga151