summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-06-13 18:59:59 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-18 00:47:24 +0400
commit0404ae035149c83fc9a04818aa7da35e482686ea (patch)
tree5ea4fe8ef46387b08c37866957cbc8df0d4be356 /drivers/usb/chipidea
parentf6a3b3a37c4772b6f0aef8e27c82e7f4287f05e3 (diff)
downloadlinux-0404ae035149c83fc9a04818aa7da35e482686ea.tar.xz
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 <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>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/usbmisc_imx.c12
1 files changed, 1 insertions, 11 deletions
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");