From cc27c96c2bee93068bfc60ea6b09611d88cef429 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 27 Nov 2011 20:16:27 +0800 Subject: usb: convert drivers/usb/* to use module_platform_driver() This patch converts the drivers in drivers/usb/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Felipe Balbi Cc: Li Yang Cc: Kuninori Morimoto Cc: Sarah Sharp Cc: Jiri Kosina Cc: Lucas De Marchi Cc: Alan Stern Signed-off-by: Axel Lin Acked-by: Peter Korsgaard Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/fsl_otg.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/usb/otg') diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index 0f420b25e9a9..2a52ff1b493d 100644 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c @@ -1151,18 +1151,7 @@ struct platform_driver fsl_otg_driver = { }, }; -static int __init fsl_usb_otg_init(void) -{ - pr_info(DRIVER_INFO "\n"); - return platform_driver_register(&fsl_otg_driver); -} -module_init(fsl_usb_otg_init); - -static void __exit fsl_usb_otg_exit(void) -{ - platform_driver_unregister(&fsl_otg_driver); -} -module_exit(fsl_usb_otg_exit); +module_platform_driver(fsl_otg_driver); MODULE_DESCRIPTION(DRIVER_INFO); MODULE_AUTHOR(DRIVER_AUTHOR); -- cgit v1.2.1