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

clk: vexpress-osc: Support building as a module

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>

+5 -7
+1 -1
drivers/clk/versatile/Kconfig
··· 23 23 of the ARM SP810 System Controller cell. 24 24 25 25 config CLK_VEXPRESS_OSC 26 - bool "Clock driver for Versatile Express OSC clock generators" 26 + tristate "Clock driver for Versatile Express OSC clock generators" 27 27 depends on VEXPRESS_CONFIG 28 28 select REGMAP_MMIO 29 29 default y if ARCH_VEXPRESS
+4 -6
drivers/clk/versatile/clk-vexpress-osc.c
··· 7 7 #include <linux/clkdev.h> 8 8 #include <linux/clk-provider.h> 9 9 #include <linux/err.h> 10 + #include <linux/module.h> 10 11 #include <linux/of.h> 11 12 #include <linux/platform_device.h> 12 13 #include <linux/slab.h> ··· 109 108 { .compatible = "arm,vexpress-osc", }, 110 109 {} 111 110 }; 111 + MODULE_DEVICE_TABLE(of, vexpress_osc_of_match); 112 112 113 113 static struct platform_driver vexpress_osc_driver = { 114 114 .driver = { ··· 118 116 }, 119 117 .probe = vexpress_osc_probe, 120 118 }; 121 - 122 - static int __init vexpress_osc_init(void) 123 - { 124 - return platform_driver_register(&vexpress_osc_driver); 125 - } 126 - core_initcall(vexpress_osc_init); 119 + module_platform_driver(vexpress_osc_driver); 120 + MODULE_LICENSE("GPL v2");