Commit 75b272bd authored by Rob Herring's avatar Rob Herring

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: default avatarSudeep Holla <sudeep.holla@arm.com>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 03cc105f
...@@ -23,7 +23,7 @@ config CLK_SP810 ...@@ -23,7 +23,7 @@ config CLK_SP810
of the ARM SP810 System Controller cell. of the ARM SP810 System Controller cell.
config CLK_VEXPRESS_OSC 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 depends on VEXPRESS_CONFIG
select REGMAP_MMIO select REGMAP_MMIO
default y if ARCH_VEXPRESS default y if ARCH_VEXPRESS
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -108,6 +109,7 @@ static const struct of_device_id vexpress_osc_of_match[] = { ...@@ -108,6 +109,7 @@ static const struct of_device_id vexpress_osc_of_match[] = {
{ .compatible = "arm,vexpress-osc", }, { .compatible = "arm,vexpress-osc", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, vexpress_osc_of_match);
static struct platform_driver vexpress_osc_driver = { static struct platform_driver vexpress_osc_driver = {
.driver = { .driver = {
...@@ -116,9 +118,5 @@ static struct platform_driver vexpress_osc_driver = { ...@@ -116,9 +118,5 @@ static struct platform_driver vexpress_osc_driver = {
}, },
.probe = vexpress_osc_probe, .probe = vexpress_osc_probe,
}; };
module_platform_driver(vexpress_osc_driver);
static int __init vexpress_osc_init(void) MODULE_LICENSE("GPL v2");
{
return platform_driver_register(&vexpress_osc_driver);
}
core_initcall(vexpress_osc_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment