]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: chipidea: usbmisc: use module_platform_driver
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 13 Jun 2013 14:59:59 +0000 (17:59 +0300)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:11 +0000 (09:54 +0800)
This patch converts the driver to use the module_platform_driver
macro which makes the code smaller and a bit simpler.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/usbmisc_imx.c

index 1c6610acbd3ebdc103687964e86ffd8e3b1c3857..588bae8eef5e03f86107f95b0bdd9926f0feea54 100644 (file)
@@ -243,17 +243,7 @@ static struct platform_driver usbmisc_imx_driver = {
         },
 };
 
-static int usbmisc_imx_drv_init(void)
-{
-       return platform_driver_register(&usbmisc_imx_driver);
-}
-subsys_initcall(usbmisc_imx_drv_init);
-
-static void usbmisc_imx_drv_exit(void)
-{
-       platform_driver_unregister(&usbmisc_imx_driver);
-}
-module_exit(usbmisc_imx_drv_exit);
+module_platform_driver(usbmisc_imx_driver);
 
 MODULE_ALIAS("platform:usbmisc-imx");
 MODULE_LICENSE("GPL v2");