Skip to contentSkip to conversation

usb: host: Fix module autoload for OF platform drivers

PATCH New Luis de Bethencourt 1 participant 5 messages Sep 19, 2015

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

v3 cover usb: host: Fix module autoload for OF platform drivers

Hi,

Resending the whole series as Greg asked, and also doing it as a thread patch series. Sorry for not doing this properly before, I'm learning the development process. I was using mutt but now I switched to git send-email. Hopefully procedure will be correct this time.

These patches add the missing MODULE_DEVICE_TABLE() for OF to export the information so modules have the correct aliases built-in and autoloading works correctly.

A longer explanation by Javier Canillas can be found here:
https://lkml.org/lkml/2015/7/30/519

Thanks,
Luis

Luis de Bethencourt (4):
usb: host: ehci-spear: Fix module autoload for OF platform driver
usb: host: fsl-mph-dr-of: Fix module autoload for OF platform driver
usb: host: ohci-spear: Fix module autoload for OF platform driver
usb: host: uhci-platform: Fix module autoload for OF platform driver

 drivers/usb/host/ehci-spear.c    | 1 +
 drivers/usb/host/fsl-mph-dr-of.c | 1 +
 drivers/usb/host/ohci-spear.c    | 1 +
 drivers/usb/host/uhci-platform.c | 1 +
 4 files changed, 4 insertions(+)
Signature · 1 line
2.5.1
#1 lore raw

PATCH v3 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..3c4e525 100644
@@ -149,6 +149,7 @@ static const struct of_device_id spear_ehci_id_table[] = {
 	{ .compatible = "st,spear600-ehci", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, spear_ehci_id_table);
 
 static struct platform_driver spear_ehci_hcd_driver = {
 	.probe		= spear_ehci_hcd_drv_probe,
Signature · 1 line
2.5.1
#2 lore raw

PATCH v3 2/4 usb: host: fsl-mph-dr-of: Fix module autoload for OF platform driver

In reply to 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/fsl-mph-dr-of.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/fsl-mph-dr-of.c +1 -0
index 534c4c5..0c38265 100644
@@ -351,6 +351,7 @@ static const struct of_device_id fsl_usb2_mph_dr_of_match[] = {
 #endif
 	{},
 };
+MODULE_DEVICE_TABLE(of, fsl_usb2_mph_dr_of_match);
 
 static struct platform_driver fsl_usb2_mph_dr_driver = {
 	.driver = {
Signature · 1 line
2.5.1
#3 lore raw

PATCH v3 3/4 usb: host: ohci-spear: Fix module autoload for OF platform driver

In reply to 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/ohci-spear.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ohci-spear.c +1 -0
index 707437c..56478ed 100644
@@ -161,6 +161,7 @@ static const struct of_device_id spear_ohci_id_table[] = {
 	{ .compatible = "st,spear600-ohci", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, spear_ohci_id_table);
 
 /* Driver definition to register with the platform bus */
 static struct platform_driver spear_ohci_hcd_driver = {
Signature · 1 line
2.5.1
#4 lore raw

PATCH v3 4/4 usb: host: uhci-platform: Fix module autoload for OF platform driver

In reply to 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/uhci-platform.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/uhci-platform.c +1 -0
index 3a3e3ee..32a6f3d 100644
@@ -140,6 +140,7 @@ static const struct of_device_id platform_uhci_ids[] = {
 	{ .compatible = "platform-uhci", },
 	{}
 };
+MODULE_DEVICE_TABLE(of, platform_uhci_ids);
 
 static struct platform_driver uhci_platform_driver = {
 	.probe		= uhci_hcd_platform_probe,
Signature · 1 line
2.5.1