diff options
author | Felipe Balbi <balbi@ti.com> | 2013-02-25 02:47:50 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:17:16 -0400 |
commit | ef222cb5b575df57d8cd511965800519b90a6c31 (patch) | |
tree | d37cbe92c7a51fc017d717f34f4322cf4d8efa62 | |
parent | 756380e04276c9099f41716d279d24e5847b1030 (diff) |
usb: gadget: pxa27x_udc: switch over to module_platform_driver
just removing some boilerplate code.
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index def73f2aa18b..3276a6d278fd 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2410,7 +2410,7 @@ static struct pxa_udc memory = { | |||
2410 | * Perform basic init : allocates udc clock, creates sysfs files, requests | 2410 | * Perform basic init : allocates udc clock, creates sysfs files, requests |
2411 | * irq. | 2411 | * irq. |
2412 | */ | 2412 | */ |
2413 | static int __init pxa_udc_probe(struct platform_device *pdev) | 2413 | static int pxa_udc_probe(struct platform_device *pdev) |
2414 | { | 2414 | { |
2415 | struct resource *regs; | 2415 | struct resource *regs; |
2416 | struct pxa_udc *udc = &memory; | 2416 | struct pxa_udc *udc = &memory; |
@@ -2612,6 +2612,7 @@ static struct platform_driver udc_driver = { | |||
2612 | .name = "pxa27x-udc", | 2612 | .name = "pxa27x-udc", |
2613 | .owner = THIS_MODULE, | 2613 | .owner = THIS_MODULE, |
2614 | }, | 2614 | }, |
2615 | .probe = pxa_udc_probe, | ||
2615 | .remove = __exit_p(pxa_udc_remove), | 2616 | .remove = __exit_p(pxa_udc_remove), |
2616 | .shutdown = pxa_udc_shutdown, | 2617 | .shutdown = pxa_udc_shutdown, |
2617 | #ifdef CONFIG_PM | 2618 | #ifdef CONFIG_PM |
@@ -2620,17 +2621,7 @@ static struct platform_driver udc_driver = { | |||
2620 | #endif | 2621 | #endif |
2621 | }; | 2622 | }; |
2622 | 2623 | ||
2623 | static int __init udc_init(void) | 2624 | module_platform_driver(udc_driver); |
2624 | { | ||
2625 | return platform_driver_probe(&udc_driver, pxa_udc_probe); | ||
2626 | } | ||
2627 | module_init(udc_init); | ||
2628 | |||
2629 | static void __exit udc_exit(void) | ||
2630 | { | ||
2631 | platform_driver_unregister(&udc_driver); | ||
2632 | } | ||
2633 | module_exit(udc_exit); | ||
2634 | 2625 | ||
2635 | MODULE_DESCRIPTION(DRIVER_DESC); | 2626 | MODULE_DESCRIPTION(DRIVER_DESC); |
2636 | MODULE_AUTHOR("Robert Jarzmik"); | 2627 | MODULE_AUTHOR("Robert Jarzmik"); |