Commit ef222cb5 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: pxa27x_udc: switch over to module_platform_driver

just removing some boilerplate code.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 756380e0
...@@ -2410,7 +2410,7 @@ static struct pxa_udc memory = { ...@@ -2410,7 +2410,7 @@ static struct pxa_udc memory = {
* Perform basic init : allocates udc clock, creates sysfs files, requests * Perform basic init : allocates udc clock, creates sysfs files, requests
* irq. * irq.
*/ */
static int __init pxa_udc_probe(struct platform_device *pdev) static int pxa_udc_probe(struct platform_device *pdev)
{ {
struct resource *regs; struct resource *regs;
struct pxa_udc *udc = &memory; struct pxa_udc *udc = &memory;
...@@ -2612,6 +2612,7 @@ static struct platform_driver udc_driver = { ...@@ -2612,6 +2612,7 @@ static struct platform_driver udc_driver = {
.name = "pxa27x-udc", .name = "pxa27x-udc",
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = pxa_udc_probe,
.remove = __exit_p(pxa_udc_remove), .remove = __exit_p(pxa_udc_remove),
.shutdown = pxa_udc_shutdown, .shutdown = pxa_udc_shutdown,
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -2620,17 +2621,7 @@ static struct platform_driver udc_driver = { ...@@ -2620,17 +2621,7 @@ static struct platform_driver udc_driver = {
#endif #endif
}; };
static int __init udc_init(void) module_platform_driver(udc_driver);
{
return platform_driver_probe(&udc_driver, pxa_udc_probe);
}
module_init(udc_init);
static void __exit udc_exit(void)
{
platform_driver_unregister(&udc_driver);
}
module_exit(udc_exit);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Robert Jarzmik"); MODULE_AUTHOR("Robert Jarzmik");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment