clk: vexpress-osc: Support building as a module
authorRob Herring <robh@kernel.org>
Wed, 29 Apr 2020 20:58:16 +0000 (15:58 -0500)
committerRob Herring <robh@kernel.org>
Wed, 13 May 2020 17:42:45 +0000 (12:42 -0500)
Enable building the vexpress-osc clock driver as a module.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/clk/versatile/Kconfig
drivers/clk/versatile/clk-vexpress-osc.c

index a47dd6c86d2e6c1842d6a7f87033788b3734a0ed..a0ed412e83968f10e32bc811847b3d6dcfce2359 100644 (file)
@@ -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
index 5bb1d5a714d01a5cd3b11f3fc40381ee2f87f07c..b2b32fa2d7c35e755c12ef75595b3df0b9ee5261 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
 #include <linux/err.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
@@ -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");