From: Sachin Kamat Date: Tue, 5 Mar 2013 04:12:15 +0000 (+0530) Subject: usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d25ab3ece05c7cb740af155ecac87b6b36f16566;p=linux-beck.git 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 Acked-by: Li Yang Signed-off-by: Felipe Balbi --- 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 = { }, }; -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);