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>
This commit is contained in:
Rob Herring 2020-04-29 15:58:16 -05:00
parent 03cc105f2e
commit 75b272bd09
2 changed files with 5 additions and 7 deletions

View 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

View 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");