From: Sachin Kamat Date: Tue, 5 Mar 2013 10:52:14 +0000 (-0300) Subject: [media] davinci_vpfe: Use module_platform_driver macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=18ace0e27395423b40352ff24c7792f4c0313e24;p=openwrt%2Fstaging%2Fblogic.git [media] davinci_vpfe: Use module_platform_driver macro module_platform_driver() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index 7b351717bcbb..c7ae7d76bb8e 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c @@ -719,22 +719,4 @@ static struct platform_driver vpfe_driver = { .remove = vpfe_remove, }; -/** - * vpfe_init : This function registers device driver - */ -static __init int vpfe_init(void) -{ - /* Register driver to the kernel */ - return platform_driver_register(&vpfe_driver); -} - -/** - * vpfe_cleanup : This function un-registers device driver - */ -static void vpfe_cleanup(void) -{ - platform_driver_unregister(&vpfe_driver); -} - -module_init(vpfe_init); -module_exit(vpfe_cleanup); +module_platform_driver(vpfe_driver);