Skip to contentSkip to conversation

clk: meson: s4: fix module autoloading

PATCH Applied Krzysztof Kozlowski 4 participants 4 messages Apr 10, 2024 – May 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: meson: s4: fix module autoloading

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Clocks are considered core components, so usually they are built-in, however these can be built and used as modules on some generic kernel.

---
 drivers/clk/meson/s4-peripherals.c | 1 +
 drivers/clk/meson/s4-pll.c         | 1 +
 2 files changed, 2 insertions(+)
drivers/clk/meson/s4-peripherals.c +1 -0
index 6c35de3d536f..22ff030bd6a8 100644
@@ -3799,6 +3799,7 @@ static const struct of_device_id clkc_match_table[] = {
 	},
 	{}
 };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
 static struct platform_driver s4_driver = {
 	.probe		= meson_s4_periphs_probe,
drivers/clk/meson/s4-pll.c +1 -0
index 8dfaeccaadc2..8a917b9703bf 100644
@@ -853,6 +853,7 @@ static const struct of_device_id clkc_match_table[] = {
 	},
 	{}
 };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
 static struct platform_driver s4_driver = {
 	.probe		= meson_s4_pll_probe,
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Krzysztof Kozlowski

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Clocks are considered core components, so usually they are built-in, however these can be built and used as modules on some generic kernel.

---
  drivers/clk/meson/s4-peripherals.c | 1 +
  drivers/clk/meson/s4-pll.c         | 1 +
  2 files changed, 2 insertions(+)
drivers/clk/meson/s4-peripherals.c +1 -0
index 6c35de3d536f..22ff030bd6a8 100644
@@ -3799,6 +3799,7 @@ static const struct of_device_id clkc_match_table[] = {
  	},
  	{}
  };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
  static struct platform_driver s4_driver = {
  	.probe		= meson_s4_periphs_probe,
drivers/clk/meson/s4-pll.c +0 -0
index 8dfaeccaadc2..8a917b9703bf 100644

drivers/clk/meson/s4-pll.c static const struct of_device_id clkc_match_table[] = { · line 859

Quoted 7 lines
drivers/clk/meson/s4-pll.c +1 -0
@@ -853,6 +853,7 @@ static const struct of_device_id clkc_match_table[] = {
  	},
  	{}
  };
+MODULE_DEVICE_TABLE(of, clkc_match_table);
 
  static struct platform_driver s4_driver = {
  	.probe		= meson_s4_pll_probe,
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 7 lines · Krzysztof Kozlowski

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Clocks are considered core components, so usually they are built-in, however these can be built and used as modules on some generic kernel.