aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-03-04 23:12:15 -0500
committerFelipe Balbi <balbi@ti.com>2013-03-18 05:18:00 -0400
commitd25ab3ece05c7cb740af155ecac87b6b36f16566 (patch)
tree7d7a5e997a01f23a439fa5d5b4446c9b44e0ef73 /drivers/usb
parentcd051da2c81c8a86f331b4caa0c135c33d3ea3f6 (diff)
usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index f22416986486..7c2a101d19ac 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2712,21 +2712,7 @@ static struct platform_driver udc_driver = {
2712 }, 2712 },
2713}; 2713};
2714 2714
2715static int __init udc_init(void) 2715module_platform_driver_probe(udc_driver, fsl_udc_probe);
2716{
2717 printk(KERN_INFO "%s (%s)\n", driver_desc, DRIVER_VERSION);
2718 return platform_driver_probe(&udc_driver, fsl_udc_probe);
2719}
2720
2721module_init(udc_init);
2722
2723static void __exit udc_exit(void)
2724{
2725 platform_driver_unregister(&udc_driver);
2726 printk(KERN_WARNING "%s unregistered\n", driver_desc);
2727}
2728
2729module_exit(udc_exit);
2730 2716
2731MODULE_DESCRIPTION(DRIVER_DESC); 2717MODULE_DESCRIPTION(DRIVER_DESC);
2732MODULE_AUTHOR(DRIVER_AUTHOR); 2718MODULE_AUTHOR(DRIVER_AUTHOR);