staging: emxx_udc: Use module_platform_driver
authorSachin Kamat <sachin.kamat@samsung.com>
Mon, 23 Jun 2014 06:25:32 +0000 (11:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:59:02 +0000 (20:59 -0400)
module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/emxx_udc/emxx_udc.c

index ee0094d8cc6e0a327efce674e99af96458ed90c8..ce1b95b0abfcec18305e0a31db9e015e70c6f556 100644 (file)
@@ -3511,24 +3511,7 @@ static struct platform_driver udc_driver = {
        },
 };
 
-
-
-/*-------------------------------------------------------------------------*/
-/* module */
-
-/*-------------------------------------------------------------------------*/
-static int __init udc_init(void)
-{
-       return platform_driver_register(&udc_driver);
-}
-module_init(udc_init);
-
-/*-------------------------------------------------------------------------*/
-static void __exit udc_exit(void)
-{
-       platform_driver_unregister(&udc_driver);
-}
-module_exit(udc_exit);
+module_platform_driver(udc_driver);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR("Renesas Electronics Corporation");