提交 d25ab3ec 编写于 作者: S Sachin Kamat 提交者: Felipe Balbi

usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NLi Yang <leoli@freescale.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 cd051da2
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册