Skip to contentSkip to conversation

USB: EHCI: ehci-mv: add missing MODULE_DEVICE_TABLE

PATCH In review Zou Wei 3 participants 3 messages May 12, 2021 – May 13, 2021

Subsystems (2)
lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 USB: EHCI: ehci-mv: add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module.

---
 drivers/usb/host/ehci-mv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-mv.c +1 -0
index cffdc8d..beb478c 100644
@@ -266,6 +266,7 @@ static const struct platform_device_id ehci_id_table[] = {
 	{"pxa-sph", 0},
 	{},
 };
+MODULE_DEVICE_TABLE(platform, ehci_id_table);
 
 static void mv_ehci_shutdown(struct platform_device *pdev)
 {
Signature · 1 line
2.6.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Zou Wei

This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module.

---
 drivers/usb/host/ehci-mv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-mv.c +0 -0
index cffdc8d..beb478c 100644

drivers/usb/host/ehci-mv.c static const struct platform_device_id ehci_id_table[] = { · line 272

Quoted 7 lines
drivers/usb/host/ehci-mv.c +1 -0
@@ -266,6 +266,7 @@ static const struct platform_device_id ehci_id_table[] = {
 	{"pxa-sph", 0},
 	{},
 };
+MODULE_DEVICE_TABLE(platform, ehci_id_table);
 
 static void mv_ehci_shutdown(struct platform_device *pdev)
 {

This is a bit odd. Nothing wrong with it, of course, but it leads one to wonder how the driver ever worked. Maybe the platforms that can use it never build the driver as a loadable module.

Alan Stern

maintainer
#2 lore raw
In reply to Zou Wei
Quoted 15 lines · Zou Wei

This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module.

---
 drivers/usb/host/ehci-mv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-mv.c +0 -0
index cffdc8d..beb478c 100644

drivers/usb/host/ehci-mv.c static const struct platform_device_id ehci_id_table[] = { · line 269

Quoted 4 lines
drivers/usb/host/ehci-mv.c +1 -0
@@ -266,6 +266,7 @@ static const struct platform_device_id ehci_id_table[] = {
 	{"pxa-sph", 0},
 	{},
 };
+MODULE_DEVICE_TABLE(platform, ehci_id_table);

As I said elsewhere, I'm not taking these unless you can show a reason why they are needed.

thanks,

greg k-h