Skip to contentSkip to conversation

usb: host: ehci-spear: Fix module autoload for OF platform driver

PATCH In review Luis de Bethencourt 2 participants 3 messages Sep 18, 2015

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

PATCH 1/4 usb: host: ehci-spear: Fix module autoload for OF platform driver

This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work.

---
 drivers/usb/host/ehci-spear.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-spear.c +1 -0
index 34e1474..be7bcf2 100644
@@ -149,6 +149,7 @@ static const struct of_device_id spear_ehci_id_table[] = {
 	{ .compatible = "st,spear600-ehci", },
 	{ },
 };
+MODULE_DEVICE_TABLE(spear_ehci_id_table);
 
 static struct platform_driver spear_ehci_hcd_driver = {
 	.probe		= spear_ehci_hcd_drv_probe,
Signature · 1 line
2.4.6
maintainer
#1 lore raw
Quoted 13 lines · Luis de Bethencourt

This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work.

---
 drivers/usb/host/ehci-spear.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-spear.c +0 -0
index 34e1474..be7bcf2 100644

drivers/usb/host/ehci-spear.c static const struct of_device_id spear_ehci_id_table[] = { · line 152

Quoted 4 lines
drivers/usb/host/ehci-spear.c +1 -0
@@ -149,6 +149,7 @@ static const struct of_device_id spear_ehci_id_table[] = {
 	{ .compatible = "st,spear600-ehci", },
 	{ },
 };
+MODULE_DEVICE_TABLE(spear_ehci_id_table);

Shouldn't this be MODULE_DEVICE_TABLE(of, spear_ehci_id_table)?

Alan Stern

#2 lore raw
Quoted 22 lines · Alan Stern
Quoted 13 lines · Luis de Bethencourt

This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work.

---
 drivers/usb/host/ehci-spear.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-spear.c +0 -0
index 34e1474..be7bcf2 100644

drivers/usb/host/ehci-spear.c static const struct of_device_id spear_ehci_id_table[] = { · line 152

Quoted 4 lines
drivers/usb/host/ehci-spear.c +1 -0
@@ -149,6 +149,7 @@ static const struct of_device_id spear_ehci_id_table[] = {
 	{ .compatible = "st,spear600-ehci", },
 	{ },
 };
+MODULE_DEVICE_TABLE(spear_ehci_id_table);

Shouldn't this be MODULE_DEVICE_TABLE(of, spear_ehci_id_table)?

Quoted 2 lines

Alan Stern

Hi Alan,

Sorry about this. It looks like I accidentally sent a temporary version of patch 1/4 and 3/4.

Sending the final and correct version now.

Thanks for the review,
Luis