Skip to content

Commit

Permalink
usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro
Browse files Browse the repository at this point in the history
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Sachin Kamat authored and Felipe Balbi committed Mar 18, 2013
1 parent cd051da commit d25ab3e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions drivers/usb/gadget/fsl_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2712,21 +2712,7 @@ static struct platform_driver udc_driver = {
},
};

static int __init udc_init(void)
{
printk(KERN_INFO "%s (%s)\n", driver_desc, DRIVER_VERSION);
return platform_driver_probe(&udc_driver, fsl_udc_probe);
}

module_init(udc_init);

static void __exit udc_exit(void)
{
platform_driver_unregister(&udc_driver);
printk(KERN_WARNING "%s unregistered\n", driver_desc);
}

module_exit(udc_exit);
module_platform_driver_probe(udc_driver, fsl_udc_probe);

MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR(DRIVER_AUTHOR);
Expand Down

0 comments on commit d25ab3e

Please sign in to comment.