diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-05 09:42:15 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:18:00 +0200 |
commit | d25ab3ece05c7cb740af155ecac87b6b36f16566 (patch) | |
tree | 7d7a5e997a01f23a439fa5d5b4446c9b44e0ef73 | |
parent | cd051da2c81c8a86f331b4caa0c135c33d3ea3f6 (diff) | |
download | op-kernel-dev-d25ab3ece05c7cb740af155ecac87b6b36f16566.zip op-kernel-dev-d25ab3ece05c7cb740af155ecac87b6b36f16566.tar.gz |
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>
-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 f224169..7c2a101 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 = { }, }; -static int __init udc_init(void) -{ - printk(KERN_INFO "%s (%s)\n", driver_desc, DRIVER_VERSION); - return platform_driver_probe(&udc_driver, fsl_udc_probe); -} - -module_init(udc_init); - -static void __exit udc_exit(void) -{ - platform_driver_unregister(&udc_driver); - printk(KERN_WARNING "%s unregistered\n", driver_desc); -} - -module_exit(udc_exit); +module_platform_driver_probe(udc_driver, fsl_udc_probe); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); |