usb: dwc3: core: Convert to module_platform_driver
authorTobias Klauser <tklauser@distanz.ch>
Tue, 28 Feb 2012 11:57:20 +0000 (12:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2012 00:20:28 +0000 (16:20 -0800)
Use the module_platform_driver macro.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c

index fd6917b8d0d73ec302e10b17cdaffa067da5adfc..7bd815a507e8c3c94f9faaf0545b465f7ed3a781 100644 (file)
@@ -597,19 +597,9 @@ static struct platform_driver dwc3_driver = {
        },
 };
 
+module_platform_driver(dwc3_driver);
+
 MODULE_ALIAS("platform:dwc3");
 MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver");
-
-static int __devinit dwc3_init(void)
-{
-       return platform_driver_register(&dwc3_driver);
-}
-module_init(dwc3_init);
-
-static void __exit dwc3_exit(void)
-{
-       platform_driver_unregister(&dwc3_driver);
-}
-module_exit(dwc3_exit);