Commit 52f7a82b authored by Fabio Porcedda's avatar Fabio Porcedda Committed by Greg Kroah-Hartman

usb: converto drivers/usb/* to use module_platform_driver_probe()

This patch converts the drivers in drivers/usb/* to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.
Signed-off-by: default avatarFabio Porcedda <fabio.porcedda@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cb9204c
...@@ -1982,17 +1982,7 @@ static struct platform_driver at91_udc_driver = { ...@@ -1982,17 +1982,7 @@ static struct platform_driver at91_udc_driver = {
}, },
}; };
static int __init udc_init_module(void) module_platform_driver_probe(at91_udc_driver, at91udc_probe);
{
return platform_driver_probe(&at91_udc_driver, at91udc_probe);
}
module_init(udc_init_module);
static void __exit udc_exit_module(void)
{
platform_driver_unregister(&at91_udc_driver);
}
module_exit(udc_exit_module);
MODULE_DESCRIPTION("AT91 udc driver"); MODULE_DESCRIPTION("AT91 udc driver");
MODULE_AUTHOR("Thomas Rathbone, David Brownell"); MODULE_AUTHOR("Thomas Rathbone, David Brownell");
......
...@@ -2066,17 +2066,7 @@ static struct platform_driver udc_driver = { ...@@ -2066,17 +2066,7 @@ static struct platform_driver udc_driver = {
}, },
}; };
static int __init udc_init(void) module_platform_driver_probe(udc_driver, usba_udc_probe);
{
return platform_driver_probe(&udc_driver, usba_udc_probe);
}
module_init(udc_init);
static void __exit udc_exit(void)
{
platform_driver_unregister(&udc_driver);
}
module_exit(udc_exit);
MODULE_DESCRIPTION("Atmel USBA UDC driver"); MODULE_DESCRIPTION("Atmel USBA UDC driver");
MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
......
...@@ -1547,15 +1547,4 @@ static struct platform_driver fusb300_driver = { ...@@ -1547,15 +1547,4 @@ static struct platform_driver fusb300_driver = {
}, },
}; };
static int __init fusb300_udc_init(void) module_platform_driver_probe(fusb300_driver, fusb300_probe);
{
return platform_driver_probe(&fusb300_driver, fusb300_probe);
}
module_init(fusb300_udc_init);
static void __exit fusb300_udc_cleanup(void)
{
platform_driver_unregister(&fusb300_driver);
}
module_exit(fusb300_udc_cleanup);
...@@ -1556,17 +1556,7 @@ static struct platform_driver udc_driver = { ...@@ -1556,17 +1556,7 @@ static struct platform_driver udc_driver = {
.resume = imx_udc_resume, .resume = imx_udc_resume,
}; };
static int __init udc_init(void) module_platform_driver_probe(udc_driver, imx_udc_probe);
{
return platform_driver_probe(&udc_driver, imx_udc_probe);
}
module_init(udc_init);
static void __exit udc_exit(void)
{
platform_driver_unregister(&udc_driver);
}
module_exit(udc_exit);
MODULE_DESCRIPTION("IMX USB Device Controller driver"); MODULE_DESCRIPTION("IMX USB Device Controller driver");
MODULE_AUTHOR("Darius Augulis <augulis.darius@gmail.com>"); MODULE_AUTHOR("Darius Augulis <augulis.darius@gmail.com>");
......
...@@ -3458,17 +3458,7 @@ static struct platform_driver lpc32xx_udc_driver = { ...@@ -3458,17 +3458,7 @@ static struct platform_driver lpc32xx_udc_driver = {
}, },
}; };
static int __init udc_init_module(void) module_platform_driver_probe(lpc32xx_udc_driver, lpc32xx_udc_probe);
{
return platform_driver_probe(&lpc32xx_udc_driver, lpc32xx_udc_probe);
}
module_init(udc_init_module);
static void __exit udc_exit_module(void)
{
platform_driver_unregister(&lpc32xx_udc_driver);
}
module_exit(udc_exit_module);
MODULE_DESCRIPTION("LPC32XX udc driver"); MODULE_DESCRIPTION("LPC32XX udc driver");
MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com>"); MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com>");
......
...@@ -1753,14 +1753,4 @@ static struct platform_driver m66592_driver = { ...@@ -1753,14 +1753,4 @@ static struct platform_driver m66592_driver = {
}, },
}; };
static int __init m66592_udc_init(void) module_platform_driver_probe(m66592_driver, m66592_probe);
{
return platform_driver_probe(&m66592_driver, m66592_probe);
}
module_init(m66592_udc_init);
static void __exit m66592_udc_cleanup(void)
{
platform_driver_unregister(&m66592_driver);
}
module_exit(m66592_udc_cleanup);
...@@ -2100,6 +2100,8 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) ...@@ -2100,6 +2100,8 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
int retval, irq; int retval, irq;
u32 chiprev; u32 chiprev;
pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
/* insist on Intel/ARM/XScale */ /* insist on Intel/ARM/XScale */
asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev)); asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev));
if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) { if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) {
...@@ -2346,18 +2348,7 @@ static struct platform_driver udc_driver = { ...@@ -2346,18 +2348,7 @@ static struct platform_driver udc_driver = {
}, },
}; };
static int __init udc_init(void) module_platform_driver_probe(udc_driver, pxa25x_udc_probe);
{
pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
return platform_driver_probe(&udc_driver, pxa25x_udc_probe);
}
module_init(udc_init);
static void __exit udc_exit(void)
{
platform_driver_unregister(&udc_driver);
}
module_exit(udc_exit);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
......
...@@ -2031,21 +2031,10 @@ static struct platform_driver r8a66597_driver = { ...@@ -2031,21 +2031,10 @@ static struct platform_driver r8a66597_driver = {
.name = (char *) udc_name, .name = (char *) udc_name,
}, },
}; };
MODULE_ALIAS("platform:r8a66597_udc");
static int __init r8a66597_udc_init(void)
{
return platform_driver_probe(&r8a66597_driver, r8a66597_probe);
}
module_init(r8a66597_udc_init);
static void __exit r8a66597_udc_cleanup(void) module_platform_driver_probe(r8a66597_driver, r8a66597_probe);
{
platform_driver_unregister(&r8a66597_driver);
}
module_exit(r8a66597_udc_cleanup);
MODULE_DESCRIPTION("R8A66597 USB gadget driver"); MODULE_DESCRIPTION("R8A66597 USB gadget driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Yoshihiro Shimoda"); MODULE_AUTHOR("Yoshihiro Shimoda");
MODULE_ALIAS("platform:r8a66597_udc");
...@@ -409,17 +409,7 @@ static struct platform_driver gpio_vbus_driver = { ...@@ -409,17 +409,7 @@ static struct platform_driver gpio_vbus_driver = {
.remove = __exit_p(gpio_vbus_remove), .remove = __exit_p(gpio_vbus_remove),
}; };
static int __init gpio_vbus_init(void) module_platform_driver_probe(gpio_vbus_driver, gpio_vbus_probe);
{
return platform_driver_probe(&gpio_vbus_driver, gpio_vbus_probe);
}
module_init(gpio_vbus_init);
static void __exit gpio_vbus_exit(void)
{
platform_driver_unregister(&gpio_vbus_driver);
}
module_exit(gpio_vbus_exit);
MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver"); MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver");
MODULE_AUTHOR("Philipp Zabel"); MODULE_AUTHOR("Philipp Zabel");
......
...@@ -1756,18 +1756,7 @@ static struct platform_driver msm_otg_driver = { ...@@ -1756,18 +1756,7 @@ static struct platform_driver msm_otg_driver = {
}, },
}; };
static int __init msm_otg_init(void) module_platform_driver_probe(msm_otg_driver, msm_otg_probe);
{
return platform_driver_probe(&msm_otg_driver, msm_otg_probe);
}
static void __exit msm_otg_exit(void)
{
platform_driver_unregister(&msm_otg_driver);
}
module_init(msm_otg_init);
module_exit(msm_otg_exit);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("MSM USB transceiver driver"); MODULE_DESCRIPTION("MSM USB transceiver driver");
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