Commit f4fce61d authored by Kay Sievers's avatar Kay Sievers Committed by Linus Torvalds

usb host: fix platform driver hotplug/coldplug

Since 43cc71ee, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable USB HCDs,
to allow re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f34c32f1
...@@ -1684,14 +1684,18 @@ static int isp116x_resume(struct platform_device *dev) ...@@ -1684,14 +1684,18 @@ static int isp116x_resume(struct platform_device *dev)
#endif #endif
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:isp116x-hcd");
static struct platform_driver isp116x_driver = { static struct platform_driver isp116x_driver = {
.probe = isp116x_probe, .probe = isp116x_probe,
.remove = isp116x_remove, .remove = isp116x_remove,
.suspend = isp116x_suspend, .suspend = isp116x_suspend,
.resume = isp116x_resume, .resume = isp116x_resume,
.driver = { .driver = {
.name = (char *)hcd_name, .name = (char *)hcd_name,
}, .owner = THIS_MODULE,
},
}; };
/*-----------------------------------------------------------------*/ /*-----------------------------------------------------------------*/
......
...@@ -355,7 +355,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) ...@@ -355,7 +355,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)
#define ohci_hcd_at91_drv_resume NULL #define ohci_hcd_at91_drv_resume NULL
#endif #endif
MODULE_ALIAS("at91_ohci"); MODULE_ALIAS("platform:at91_ohci");
static struct platform_driver ohci_hcd_at91_driver = { static struct platform_driver ohci_hcd_at91_driver = {
.probe = ohci_hcd_at91_drv_probe, .probe = ohci_hcd_at91_drv_probe,
...@@ -368,4 +368,3 @@ static struct platform_driver ohci_hcd_at91_driver = { ...@@ -368,4 +368,3 @@ static struct platform_driver ohci_hcd_at91_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
}; };
...@@ -345,3 +345,4 @@ static struct platform_driver ohci_hcd_au1xxx_driver = { ...@@ -345,3 +345,4 @@ static struct platform_driver ohci_hcd_au1xxx_driver = {
}, },
}; };
MODULE_ALIAS("platform:au1xxx-ohci");
...@@ -211,6 +211,8 @@ static struct platform_driver ohci_hcd_ep93xx_driver = { ...@@ -211,6 +211,8 @@ static struct platform_driver ohci_hcd_ep93xx_driver = {
#endif #endif
.driver = { .driver = {
.name = "ep93xx-ohci", .name = "ep93xx-ohci",
.owner = THIS_MODULE,
}, },
}; };
MODULE_ALIAS("platform:ep93xx-ohci");
...@@ -251,3 +251,4 @@ static struct platform_driver ohci_hcd_lh7a404_driver = { ...@@ -251,3 +251,4 @@ static struct platform_driver ohci_hcd_lh7a404_driver = {
}, },
}; };
MODULE_ALIAS("platform:lh7a404-ohci");
...@@ -544,3 +544,4 @@ static struct platform_driver ohci_hcd_omap_driver = { ...@@ -544,3 +544,4 @@ static struct platform_driver ohci_hcd_omap_driver = {
}, },
}; };
MODULE_ALIAS("platform:ohci");
...@@ -456,9 +456,13 @@ static int usb_hcd_pnx4008_remove(struct platform_device *pdev) ...@@ -456,9 +456,13 @@ static int usb_hcd_pnx4008_remove(struct platform_device *pdev)
return 0; return 0;
} }
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:usb-ohci");
static struct platform_driver usb_hcd_pnx4008_driver = { static struct platform_driver usb_hcd_pnx4008_driver = {
.driver = { .driver = {
.name = "usb-ohci", .name = "usb-ohci",
.owner = THIS_MODULE,
}, },
.probe = usb_hcd_pnx4008_probe, .probe = usb_hcd_pnx4008_probe,
.remove = usb_hcd_pnx4008_remove, .remove = usb_hcd_pnx4008_remove,
......
...@@ -230,11 +230,12 @@ static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev) ...@@ -230,11 +230,12 @@ static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev)
return 0; return 0;
} }
MODULE_ALIAS("pnx8550-ohci"); MODULE_ALIAS("platform:pnx8550-ohci");
static struct platform_driver ohci_hcd_pnx8550_driver = { static struct platform_driver ohci_hcd_pnx8550_driver = {
.driver = { .driver = {
.name = "pnx8550-ohci", .name = "pnx8550-ohci",
.owner = THIS_MODULE,
}, },
.probe = ohci_hcd_pnx8550_drv_probe, .probe = ohci_hcd_pnx8550_drv_probe,
.remove = ohci_hcd_pnx8550_drv_remove, .remove = ohci_hcd_pnx8550_drv_remove,
......
...@@ -213,3 +213,4 @@ static struct platform_driver ohci_hcd_ppc_soc_driver = { ...@@ -213,3 +213,4 @@ static struct platform_driver ohci_hcd_ppc_soc_driver = {
}, },
}; };
MODULE_ALIAS("platform:ppc-soc-ohci");
...@@ -364,6 +364,8 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev) ...@@ -364,6 +364,8 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
} }
#endif #endif
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:pxa27x-ohci");
static struct platform_driver ohci_hcd_pxa27x_driver = { static struct platform_driver ohci_hcd_pxa27x_driver = {
.probe = ohci_hcd_pxa27x_drv_probe, .probe = ohci_hcd_pxa27x_drv_probe,
...@@ -375,6 +377,7 @@ static struct platform_driver ohci_hcd_pxa27x_driver = { ...@@ -375,6 +377,7 @@ static struct platform_driver ohci_hcd_pxa27x_driver = {
#endif #endif
.driver = { .driver = {
.name = "pxa27x-ohci", .name = "pxa27x-ohci",
.owner = THIS_MODULE,
}, },
}; };
...@@ -501,3 +501,4 @@ static struct platform_driver ohci_hcd_s3c2410_driver = { ...@@ -501,3 +501,4 @@ static struct platform_driver ohci_hcd_s3c2410_driver = {
}, },
}; };
MODULE_ALIAS("platform:s3c2410-ohci");
...@@ -141,3 +141,4 @@ static struct platform_driver ohci_hcd_sh_driver = { ...@@ -141,3 +141,4 @@ static struct platform_driver ohci_hcd_sh_driver = {
}, },
}; };
MODULE_ALIAS("platform:sh_ohci");
...@@ -262,3 +262,4 @@ static struct platform_driver ohci_hcd_sm501_driver = { ...@@ -262,3 +262,4 @@ static struct platform_driver ohci_hcd_sm501_driver = {
.name = "sm501-usb", .name = "sm501-usb",
}, },
}; };
MODULE_ALIAS("platform:sm501-usb");
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver"); MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Yoshihiro Shimoda"); MODULE_AUTHOR("Yoshihiro Shimoda");
MODULE_ALIAS("platform:r8a66597_hcd");
#define DRIVER_VERSION "29 May 2007" #define DRIVER_VERSION "29 May 2007"
...@@ -2219,6 +2220,7 @@ static struct platform_driver r8a66597_driver = { ...@@ -2219,6 +2220,7 @@ static struct platform_driver r8a66597_driver = {
.resume = r8a66597_resume, .resume = r8a66597_resume,
.driver = { .driver = {
.name = (char *) hcd_name, .name = (char *) hcd_name,
.owner = THIS_MODULE,
}, },
}; };
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
MODULE_DESCRIPTION("SL811HS USB Host Controller Driver"); MODULE_DESCRIPTION("SL811HS USB Host Controller Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:sl811-hcd");
#define DRIVER_VERSION "19 May 2005" #define DRIVER_VERSION "19 May 2005"
......
...@@ -3316,3 +3316,4 @@ static void __exit u132_hcd_exit(void) ...@@ -3316,3 +3316,4 @@ static void __exit u132_hcd_exit(void)
module_exit(u132_hcd_exit); module_exit(u132_hcd_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:u132_hcd");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment