usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 5 Mar 2013 04:12:15 +0000 (09:42 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:18:00 +0000 (11:18 +0200)
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>
drivers/usb/gadget/fsl_udc_core.c

index f22416986486073d10a5a1d586fdf5aae541a5ae..7c2a101d19acfd9702aab4f0505db25226a0b79b 100644 (file)
@@ -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);