diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-04 23:12:15 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:18:00 -0400 |
commit | d25ab3ece05c7cb740af155ecac87b6b36f16566 (patch) | |
tree | 7d7a5e997a01f23a439fa5d5b4446c9b44e0ef73 /drivers/usb | |
parent | cd051da2c81c8a86f331b4caa0c135c33d3ea3f6 (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.c | 16 |
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 | ||
2715 | static int __init udc_init(void) | 2715 | module_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 | |||
2721 | module_init(udc_init); | ||
2722 | |||
2723 | static void __exit udc_exit(void) | ||
2724 | { | ||
2725 | platform_driver_unregister(&udc_driver); | ||
2726 | printk(KERN_WARNING "%s unregistered\n", driver_desc); | ||
2727 | } | ||
2728 | |||
2729 | module_exit(udc_exit); | ||
2730 | 2716 | ||
2731 | MODULE_DESCRIPTION(DRIVER_DESC); | 2717 | MODULE_DESCRIPTION(DRIVER_DESC); |
2732 | MODULE_AUTHOR(DRIVER_AUTHOR); | 2718 | MODULE_AUTHOR(DRIVER_AUTHOR); |