aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2013-01-09 06:15:28 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 20:39:34 -0500
commit52f7a82b59ff385da86a3ed17c8d9f6a83531004 (patch)
tree8ad525a379e0bee72fbcd74739780230b0d49fc6
parent1cb9204cc6e22ec18e62ab0687e2240cbdb15200 (diff)
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: Fabio 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/at91_udc.c12
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c12
-rw-r--r--drivers/usb/gadget/fusb300_udc.c13
-rw-r--r--drivers/usb/gadget/imx_udc.c12
-rw-r--r--drivers/usb/gadget/lpc32xx_udc.c12
-rw-r--r--drivers/usb/gadget/m66592-udc.c12
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c15
-rw-r--r--drivers/usb/gadget/r8a66597-udc.c15
-rw-r--r--drivers/usb/otg/gpio_vbus.c12
-rw-r--r--drivers/usb/otg/msm_otg.c13
10 files changed, 13 insertions, 115 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index f4a21f6f081f..0143ffa4e409 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1982,17 +1982,7 @@ static struct platform_driver at91_udc_driver = {
1982 }, 1982 },
1983}; 1983};
1984 1984
1985static int __init udc_init_module(void) 1985module_platform_driver_probe(at91_udc_driver, at91udc_probe);
1986{
1987 return platform_driver_probe(&at91_udc_driver, at91udc_probe);
1988}
1989module_init(udc_init_module);
1990
1991static void __exit udc_exit_module(void)
1992{
1993 platform_driver_unregister(&at91_udc_driver);
1994}
1995module_exit(udc_exit_module);
1996 1986
1997MODULE_DESCRIPTION("AT91 udc driver"); 1987MODULE_DESCRIPTION("AT91 udc driver");
1998MODULE_AUTHOR("Thomas Rathbone, David Brownell"); 1988MODULE_AUTHOR("Thomas Rathbone, David Brownell");
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index a7aed84d98c9..bc19496bcec0 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2066,17 +2066,7 @@ static struct platform_driver udc_driver = {
2066 }, 2066 },
2067}; 2067};
2068 2068
2069static int __init udc_init(void) 2069module_platform_driver_probe(udc_driver, usba_udc_probe);
2070{
2071 return platform_driver_probe(&udc_driver, usba_udc_probe);
2072}
2073module_init(udc_init);
2074
2075static void __exit udc_exit(void)
2076{
2077 platform_driver_unregister(&udc_driver);
2078}
2079module_exit(udc_exit);
2080 2070
2081MODULE_DESCRIPTION("Atmel USBA UDC driver"); 2071MODULE_DESCRIPTION("Atmel USBA UDC driver");
2082MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); 2072MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index 72cd5e6719db..fc7cb09ab52b 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -1547,15 +1547,4 @@ static struct platform_driver fusb300_driver = {
1547 }, 1547 },
1548}; 1548};
1549 1549
1550static int __init fusb300_udc_init(void) 1550module_platform_driver_probe(fusb300_driver, fusb300_probe);
1551{
1552 return platform_driver_probe(&fusb300_driver, fusb300_probe);
1553}
1554
1555module_init(fusb300_udc_init);
1556
1557static void __exit fusb300_udc_cleanup(void)
1558{
1559 platform_driver_unregister(&fusb300_driver);
1560}
1561module_exit(fusb300_udc_cleanup);
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
index a0eb85794fd4..8efd7555fa21 100644
--- a/drivers/usb/gadget/imx_udc.c
+++ b/drivers/usb/gadget/imx_udc.c
@@ -1556,17 +1556,7 @@ static struct platform_driver udc_driver = {
1556 .resume = imx_udc_resume, 1556 .resume = imx_udc_resume,
1557}; 1557};
1558 1558
1559static int __init udc_init(void) 1559module_platform_driver_probe(udc_driver, imx_udc_probe);
1560{
1561 return platform_driver_probe(&udc_driver, imx_udc_probe);
1562}
1563module_init(udc_init);
1564
1565static void __exit udc_exit(void)
1566{
1567 platform_driver_unregister(&udc_driver);
1568}
1569module_exit(udc_exit);
1570 1560
1571MODULE_DESCRIPTION("IMX USB Device Controller driver"); 1561MODULE_DESCRIPTION("IMX USB Device Controller driver");
1572MODULE_AUTHOR("Darius Augulis <augulis.darius@gmail.com>"); 1562MODULE_AUTHOR("Darius Augulis <augulis.darius@gmail.com>");
diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c
index dd1c9b1fe528..aa04089d6899 100644
--- a/drivers/usb/gadget/lpc32xx_udc.c
+++ b/drivers/usb/gadget/lpc32xx_udc.c
@@ -3458,17 +3458,7 @@ static struct platform_driver lpc32xx_udc_driver = {
3458 }, 3458 },
3459}; 3459};
3460 3460
3461static int __init udc_init_module(void) 3461module_platform_driver_probe(lpc32xx_udc_driver, lpc32xx_udc_probe);
3462{
3463 return platform_driver_probe(&lpc32xx_udc_driver, lpc32xx_udc_probe);
3464}
3465module_init(udc_init_module);
3466
3467static void __exit udc_exit_module(void)
3468{
3469 platform_driver_unregister(&lpc32xx_udc_driver);
3470}
3471module_exit(udc_exit_module);
3472 3462
3473MODULE_DESCRIPTION("LPC32XX udc driver"); 3463MODULE_DESCRIPTION("LPC32XX udc driver");
3474MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com>"); 3464MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com>");
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index b6401f1b56ce..dfce0cfe4e6f 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -1753,14 +1753,4 @@ static struct platform_driver m66592_driver = {
1753 }, 1753 },
1754}; 1754};
1755 1755
1756static int __init m66592_udc_init(void) 1756module_platform_driver_probe(m66592_driver, m66592_probe);
1757{
1758 return platform_driver_probe(&m66592_driver, m66592_probe);
1759}
1760module_init(m66592_udc_init);
1761
1762static void __exit m66592_udc_cleanup(void)
1763{
1764 platform_driver_unregister(&m66592_driver);
1765}
1766module_exit(m66592_udc_cleanup);
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index d4ca9f1f7f24..d52e869ce202 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -2100,6 +2100,8 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
2100 int retval, irq; 2100 int retval, irq;
2101 u32 chiprev; 2101 u32 chiprev;
2102 2102
2103 pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
2104
2103 /* insist on Intel/ARM/XScale */ 2105 /* insist on Intel/ARM/XScale */
2104 asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev)); 2106 asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev));
2105 if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) { 2107 if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) {
@@ -2346,18 +2348,7 @@ static struct platform_driver udc_driver = {
2346 }, 2348 },
2347}; 2349};
2348 2350
2349static int __init udc_init(void) 2351module_platform_driver_probe(udc_driver, pxa25x_udc_probe);
2350{
2351 pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
2352 return platform_driver_probe(&udc_driver, pxa25x_udc_probe);
2353}
2354module_init(udc_init);
2355
2356static void __exit udc_exit(void)
2357{
2358 platform_driver_unregister(&udc_driver);
2359}
2360module_exit(udc_exit);
2361 2352
2362MODULE_DESCRIPTION(DRIVER_DESC); 2353MODULE_DESCRIPTION(DRIVER_DESC);
2363MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); 2354MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
index 5a80751accb7..9a9fadd9095f 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -2031,21 +2031,10 @@ static struct platform_driver r8a66597_driver = {
2031 .name = (char *) udc_name, 2031 .name = (char *) udc_name,
2032 }, 2032 },
2033}; 2033};
2034MODULE_ALIAS("platform:r8a66597_udc");
2035
2036static int __init r8a66597_udc_init(void)
2037{
2038 return platform_driver_probe(&r8a66597_driver, r8a66597_probe);
2039}
2040module_init(r8a66597_udc_init);
2041 2034
2042static void __exit r8a66597_udc_cleanup(void) 2035module_platform_driver_probe(r8a66597_driver, r8a66597_probe);
2043{
2044 platform_driver_unregister(&r8a66597_driver);
2045}
2046module_exit(r8a66597_udc_cleanup);
2047 2036
2048MODULE_DESCRIPTION("R8A66597 USB gadget driver"); 2037MODULE_DESCRIPTION("R8A66597 USB gadget driver");
2049MODULE_LICENSE("GPL"); 2038MODULE_LICENSE("GPL");
2050MODULE_AUTHOR("Yoshihiro Shimoda"); 2039MODULE_AUTHOR("Yoshihiro Shimoda");
2051 2040MODULE_ALIAS("platform:r8a66597_udc");
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
index a67ffe22179a..a7d4ac591982 100644
--- a/drivers/usb/otg/gpio_vbus.c
+++ b/drivers/usb/otg/gpio_vbus.c
@@ -409,17 +409,7 @@ static struct platform_driver gpio_vbus_driver = {
409 .remove = __exit_p(gpio_vbus_remove), 409 .remove = __exit_p(gpio_vbus_remove),
410}; 410};
411 411
412static int __init gpio_vbus_init(void) 412module_platform_driver_probe(gpio_vbus_driver, gpio_vbus_probe);
413{
414 return platform_driver_probe(&gpio_vbus_driver, gpio_vbus_probe);
415}
416module_init(gpio_vbus_init);
417
418static void __exit gpio_vbus_exit(void)
419{
420 platform_driver_unregister(&gpio_vbus_driver);
421}
422module_exit(gpio_vbus_exit);
423 413
424MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver"); 414MODULE_DESCRIPTION("simple GPIO controlled OTG transceiver driver");
425MODULE_AUTHOR("Philipp Zabel"); 415MODULE_AUTHOR("Philipp Zabel");
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 3b9f0d951132..749fbf41fb6f 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -1756,18 +1756,7 @@ static struct platform_driver msm_otg_driver = {
1756 }, 1756 },
1757}; 1757};
1758 1758
1759static int __init msm_otg_init(void) 1759module_platform_driver_probe(msm_otg_driver, msm_otg_probe);
1760{
1761 return platform_driver_probe(&msm_otg_driver, msm_otg_probe);
1762}
1763
1764static void __exit msm_otg_exit(void)
1765{
1766 platform_driver_unregister(&msm_otg_driver);
1767}
1768
1769module_init(msm_otg_init);
1770module_exit(msm_otg_exit);
1771 1760
1772MODULE_LICENSE("GPL v2"); 1761MODULE_LICENSE("GPL v2");
1773MODULE_DESCRIPTION("MSM USB transceiver driver"); 1762MODULE_DESCRIPTION("MSM USB transceiver driver");