usb: dwc3: omap: move to module_platform_driver
authorFelipe Balbi <balbi@ti.com>
Fri, 18 Nov 2011 19:31:14 +0000 (21:31 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:48:43 +0000 (11:48 +0200)
the new module_platform_driver macro is a helper
for modules which just register and unregister the
platform_driver. It allows us to delete a few
duplicated lines.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/dwc3-omap.c

index c8a1bc53ed6123510aabb9636e7a03b6dead094e..5809bf413d76c788a9fa6b4bf3503431a6da6444 100644 (file)
@@ -399,14 +399,4 @@ MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_DESCRIPTION("DesignWare USB3 OMAP Glue Layer");
 
-static int __devinit dwc3_omap_init(void)
-{
-       return platform_driver_register(&dwc3_omap_driver);
-}
-module_init(dwc3_omap_init);
-
-static void __exit dwc3_omap_exit(void)
-{
-       platform_driver_unregister(&dwc3_omap_driver);
-}
-module_exit(dwc3_omap_exit);
+module_platform_driver(dwc3_omap_driver);