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/c67x00/c67x00-drv.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/usb/c67x00/c67x00-drv.c') diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index 57ae44cd0b88..6f3b6e267398 100644 --- a/drivers/usb/c67x00/c67x00-drv.c +++ b/drivers/usb/c67x00/c67x00-drv.c @@ -225,21 +225,10 @@ static struct platform_driver c67x00_driver = { .name = "c67x00", }, }; -MODULE_ALIAS("platform:c67x00"); - -static int __init c67x00_init(void) -{ - return platform_driver_register(&c67x00_driver); -} -static void __exit c67x00_exit(void) -{ - platform_driver_unregister(&c67x00_driver); -} - -module_init(c67x00_init); -module_exit(c67x00_exit); +module_platform_driver(c67x00_driver); MODULE_AUTHOR("Peter Korsgaard, Jan Veldeman, Grant Likely"); MODULE_DESCRIPTION("Cypress C67X00 USB Controller Driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:c67x00"); -- cgit v1.2.3