Skip to contentSkip to conversation

clk: allow building lan966x as a module

PATCH Applied Clément Léger 2 participants 2 messages Jun 17, 2022 – Oct 3, 2022 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: allow building lan966x as a module

Set the COMMON_CLK_LAN966X option as a tristate and switch from builtin_platform_driver() to module_platform_driver() to allow building and using this driver as a module.

---
 drivers/clk/Kconfig       | 2 +-
 drivers/clk/clk-lan966x.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/clk/Kconfig +1 -1
index 48f8f4221e21..ac77d4b2c742 100644
@@ -249,7 +249,7 @@ config COMMON_CLK_GEMINI
 	  platform, also known as SL3516 or CS3516.
 
 config COMMON_CLK_LAN966X
-	bool "Generic Clock Controller driver for LAN966X SoC"
+	tristate "Generic Clock Controller driver for LAN966X SoC"
 	depends on HAS_IOMEM
 	depends on OF
 	depends on SOC_LAN966 || COMPILE_TEST
drivers/clk/clk-lan966x.c +1 -1
index d1535ac13e89..90a335ddd735 100644
@@ -286,7 +286,7 @@ static struct platform_driver lan966x_clk_driver = {
 		.of_match_table = lan966x_clk_dt_ids,
 	},
 };
-builtin_platform_driver(lan966x_clk_driver);
+module_platform_driver(lan966x_clk_driver);
 
 MODULE_AUTHOR("Kavyasree Kotagiri <[email protected]>");
 MODULE_DESCRIPTION("LAN966X clock driver");
Signature · 1 line
2.36.1
maintainer Applied
#1 lore raw

Quoting Clément Léger (2022-06-17 03:33:06)

Quoted 6 lines

Set the COMMON_CLK_LAN966X option as a tristate and switch from builtin_platform_driver() to module_platform_driver() to allow building and using this driver as a module.

---

Applied to clk-next