summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-03-05 07:52:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 14:02:37 -0300
commit18ace0e27395423b40352ff24c7792f4c0313e24 (patch)
treedba0037787b73300df4389cee04c1c77c84d582c
parent01c8132303ea5ea237cdc85ae7f144f62747910b (diff)
downloadlinux-18ace0e27395423b40352ff24c7792f4c0313e24.tar.gz
linux-18ace0e27395423b40352ff24c7792f4c0313e24.tar.bz2
linux-18ace0e27395423b40352ff24c7792f4c0313e24.zip
[media] davinci_vpfe: Use module_platform_driver macro
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>
-rw-r--r--drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c20
1 files changed, 1 insertions, 19 deletions
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);