Subject: [PATCH v2 07/16] clk: vexpress-osc: Support building as a module

From: Rob Herring <[email-masked]>
Date: Wed, 29 Apr 2020 15:58:16 -0500

Enable building the vexpress-osc clock driver as a module.

Cc: Linus Walleij <[email-masked]>
Cc: Liviu Dudau <[email-masked]>
Cc: Sudeep Holla <[email-masked]>
Cc: Lorenzo Pieralisi <[email-masked]>
Cc: Michael Turquette <[email-masked]>
Cc: Stephen Boyd <[email-masked]>
Cc: [email-masked]
Signed-off-by: Rob Herring <[email-masked]>
---
 drivers/clk/versatile/clk-vexpress-osc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

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

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel