aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-27 07:16:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-27 16:48:32 -0500
commitcc27c96c2bee93068bfc60ea6b09611d88cef429 (patch)
tree47068da713ecb9f9383b3538831d0d3f3d170460 /drivers/usb/gadget
parentc64391f264b7658c00515173cca58f5b054af1a2 (diff)
usb: convert drivers/usb/* to use module_platform_driver()
This patch converts the drivers in drivers/usb/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/fsl_qe_udc.c15
-rw-r--r--drivers/usb/gadget/mv_udc_core.c19
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c13
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c15
4 files changed, 7 insertions, 55 deletions
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 2a03e4de11c..811ea76ae76 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2815,20 +2815,7 @@ static struct platform_driver udc_driver = {
2815#endif 2815#endif
2816}; 2816};
2817 2817
2818static int __init qe_udc_init(void) 2818module_platform_driver(udc_driver);
2819{
2820 printk(KERN_INFO "%s: %s, %s\n", driver_name, driver_desc,
2821 DRIVER_VERSION);
2822 return platform_driver_register(&udc_driver);
2823}
2824
2825static void __exit qe_udc_exit(void)
2826{
2827 platform_driver_unregister(&udc_driver);
2828}
2829
2830module_init(qe_udc_init);
2831module_exit(qe_udc_exit);
2832 2819
2833MODULE_DESCRIPTION(DRIVER_DESC); 2820MODULE_DESCRIPTION(DRIVER_DESC);
2834MODULE_AUTHOR(DRIVER_AUTHOR); 2821MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index 892412103dd..0114fd33fbe 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -2463,24 +2463,11 @@ static struct platform_driver udc_driver = {
2463#endif 2463#endif
2464 }, 2464 },
2465}; 2465};
2466MODULE_ALIAS("platform:pxa-u2o"); 2466
2467module_platform_driver(udc_driver);
2467 2468
2468MODULE_DESCRIPTION(DRIVER_DESC); 2469MODULE_DESCRIPTION(DRIVER_DESC);
2469MODULE_AUTHOR("Chao Xie <chao.xie@marvell.com>"); 2470MODULE_AUTHOR("Chao Xie <chao.xie@marvell.com>");
2470MODULE_VERSION(DRIVER_VERSION); 2471MODULE_VERSION(DRIVER_VERSION);
2471MODULE_LICENSE("GPL"); 2472MODULE_LICENSE("GPL");
2472 2473MODULE_ALIAS("platform:pxa-u2o");
2473
2474static int __init init(void)
2475{
2476 return platform_driver_register(&udc_driver);
2477}
2478module_init(init);
2479
2480
2481static void __exit cleanup(void)
2482{
2483 platform_driver_unregister(&udc_driver);
2484}
2485module_exit(cleanup);
2486
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index a552453dc94..745a3081fb3 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3469,18 +3469,7 @@ static struct platform_driver s3c_hsotg_driver = {
3469 .resume = s3c_hsotg_resume, 3469 .resume = s3c_hsotg_resume,
3470}; 3470};
3471 3471
3472static int __init s3c_hsotg_modinit(void) 3472module_platform_driver(s3c_hsotg_driver);
3473{
3474 return platform_driver_register(&s3c_hsotg_driver);
3475}
3476
3477static void __exit s3c_hsotg_modexit(void)
3478{
3479 platform_driver_unregister(&s3c_hsotg_driver);
3480}
3481
3482module_init(s3c_hsotg_modinit);
3483module_exit(s3c_hsotg_modexit);
3484 3473
3485MODULE_DESCRIPTION("Samsung S3C USB High-speed/OtG device"); 3474MODULE_DESCRIPTION("Samsung S3C USB High-speed/OtG device");
3486MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); 3475MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index 8d54f893cef..baf506a66de 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -1378,21 +1378,10 @@ static struct platform_driver s3c_hsudc_driver = {
1378 }, 1378 },
1379 .probe = s3c_hsudc_probe, 1379 .probe = s3c_hsudc_probe,
1380}; 1380};
1381MODULE_ALIAS("platform:s3c-hsudc");
1382
1383static int __init s3c_hsudc_modinit(void)
1384{
1385 return platform_driver_register(&s3c_hsudc_driver);
1386}
1387 1381
1388static void __exit s3c_hsudc_modexit(void) 1382module_platform_driver(s3c_hsudc_driver);
1389{
1390 platform_driver_unregister(&s3c_hsudc_driver);
1391}
1392
1393module_init(s3c_hsudc_modinit);
1394module_exit(s3c_hsudc_modexit);
1395 1383
1396MODULE_DESCRIPTION("Samsung S3C24XX USB high-speed controller driver"); 1384MODULE_DESCRIPTION("Samsung S3C24XX USB high-speed controller driver");
1397MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>"); 1385MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>");
1398MODULE_LICENSE("GPL"); 1386MODULE_LICENSE("GPL");
1387MODULE_ALIAS("platform:s3c-hsudc");