[media] davinci_vpfe: Use module_platform_driver macro
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 5 Mar 2013 10:52:14 +0000 (07:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 17:02:37 +0000 (14:02 -0300)
module_platform_driver() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c

index 7b351717bcbb001b9618d8d3442ea0144863f7cc..c7ae7d76bb8e59cdd92d52ef676b3e90860faacd 100644 (file)
@@ -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);