From 52f7a82b59ff385da86a3ed17c8d9f6a83531004 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Wed, 9 Jan 2013 12:15:28 +0100 Subject: usb: converto drivers/usb/* to use module_platform_driver_probe() This patch converts the drivers in drivers/usb/* to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda Cc: Felipe Balbi Cc: Nicolas Ferre Cc: Eric Miao Cc: Russell King Cc: Haojian Zhuang Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/pxa25x_udc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'drivers/usb/gadget/pxa25x_udc.c') diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index d4ca9f1f7f24..d52e869ce202 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -2100,6 +2100,8 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) int retval, irq; u32 chiprev; + pr_info("%s: version %s\n", driver_name, DRIVER_VERSION); + /* insist on Intel/ARM/XScale */ asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev)); if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) { @@ -2346,18 +2348,7 @@ static struct platform_driver udc_driver = { }, }; -static int __init udc_init(void) -{ - pr_info("%s: version %s\n", driver_name, DRIVER_VERSION); - return platform_driver_probe(&udc_driver, pxa25x_udc_probe); -} -module_init(udc_init); - -static void __exit udc_exit(void) -{ - platform_driver_unregister(&udc_driver); -} -module_exit(udc_exit); +module_platform_driver_probe(udc_driver, pxa25x_udc_probe); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell"); -- cgit v1.2.3