Skip to contentSkip to conversation

clk: sifive: prci: fix module autoloading

PATCH In review Krzysztof Kozlowski 2 participants 2 messages Apr 10, 2024

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

PATCH 1/1 clk: sifive: prci: 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/sifive/sifive-prci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/sifive/sifive-prci.c +1 -0
index 25b8e1a80ddc..700a1be9ec47 100644
@@ -611,6 +611,7 @@ static const struct of_device_id sifive_prci_of_match[] = {
 	{.compatible = "sifive,fu740-c000-prci", .data = &prci_clk_fu740},
 	{}
 };
+MODULE_DEVICE_TABLE(of, sifive_prci_of_match);
 
 static struct platform_driver sifive_prci_driver = {
 	.driver = {
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 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/sifive/sifive-prci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/sifive/sifive-prci.c +0 -0
index 25b8e1a80ddc..700a1be9ec47 100644

drivers/clk/sifive/sifive-prci.c static const struct of_device_id sifive_prci_of_match[] = { · line 617

Quoted 7 lines
drivers/clk/sifive/sifive-prci.c +1 -0
@@ -611,6 +611,7 @@ static const struct of_device_id sifive_prci_of_match[] = {
 	{.compatible = "sifive,fu740-c000-prci", .data = &prci_clk_fu740},
 	{}
 };
+MODULE_DEVICE_TABLE(of, sifive_prci_of_match);
 
 static struct platform_driver sifive_prci_driver = {
 	.driver = {