From: Philipp Zabel
Date: Thu, 13 Jun 2013 14:59:59 +0000 (+0300)
Subject: usb: chipidea: usbmisc: use module_platform_driver
X-Git-Tag: firefly_0821_release~176^2~5847^2~36
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0404ae035149c83fc9a04818aa7da35e482686ea;p=firefly-linux-kernel-4.4.55.git
usb: chipidea: usbmisc: use module_platform_driver
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
Signed-off-by: Michael Grzeschik
Signed-off-by: Alexander Shishkin
Signed-off-by: Greg Kroah-Hartman
---
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 1c6610acbd3e..588bae8eef5e 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -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");