Skip to contentSkip to conversation

i3c: master: cdns: fix module autoloading

PATCH Applied Liao Chen 3 participants 3 messages Aug 26, 2024 – Sep 5, 2024

Subsystems (2)
lore
Share & tools
lore

Liao Chen

author
#0 lore raw

PATCH 1/1 i3c: master: cdns: fix module autoloading

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/i3c/master/i3c-master-cdns.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i3c/master/i3c-master-cdns.c +1 -0
index c1627f3552ce..ee555255f1a2 100644
@@ -1562,6 +1562,7 @@ static const struct of_device_id cdns_i3c_master_of_ids[] = {
 	{ .compatible = "cdns,i3c-master", .data = &cdns_i3c_devdata },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, cdns_i3c_master_of_ids);
 
 static int cdns_i3c_master_probe(struct platform_device *pdev)
 {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 13 lines · Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
  drivers/i3c/master/i3c-master-cdns.c | 1 +
  1 file changed, 1 insertion(+)
drivers/i3c/master/i3c-master-cdns.c +0 -0
index c1627f3552ce..ee555255f1a2 100644

drivers/i3c/master/i3c-master-cdns.c static const struct of_device_id cdns_i3c_master_of_ids[] = { · line 1566

Quoted 5 lines
drivers/i3c/master/i3c-master-cdns.c +1 -0
@@ -1562,6 +1562,7 @@ static const struct of_device_id cdns_i3c_master_of_ids[] = {
  	{ .compatible = "cdns,i3c-master", .data = &cdns_i3c_devdata },
  	{ /* sentinel */ },
  };
+MODULE_DEVICE_TABLE(of, cdns_i3c_master_of_ids);
 

why not to use i3c as type instead of "of" ? Just curious, if it makes sense.

Quoted 2 lines
drivers/i3c/master/i3c-master-cdns.c +0 -0
  static int cdns_i3c_master_probe(struct platform_device *pdev)
  {
maintainer Applied
#2 lore raw
In reply to Liao Chen
Quoted 4 lines · Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

Applied, thanks!

[1/1] i3c: master: cdns: fix module autoloading

      https://git.kernel.org/abelloni/c/133f67bea5e0

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com