[media] v4l: ti-vpe: use module_platform_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 30 Oct 2013 03:09:44 +0000 (00:09 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 10 Dec 2013 08:34:53 +0000 (06:34 -0200)
module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/ti-vpe/vpe.c

index 4e58069e24ff16877f7dc642bf6a99c4838f7715..89658a3ab23e007883302b6cc0c3a2eef17153bb 100644 (file)
@@ -2081,18 +2081,7 @@ static struct platform_driver vpe_pdrv = {
        },
 };
 
-static void __exit vpe_exit(void)
-{
-       platform_driver_unregister(&vpe_pdrv);
-}
-
-static int __init vpe_init(void)
-{
-       return platform_driver_register(&vpe_pdrv);
-}
-
-module_init(vpe_init);
-module_exit(vpe_exit);
+module_platform_driver(vpe_pdrv);
 
 MODULE_DESCRIPTION("TI VPE driver");
 MODULE_AUTHOR("Dale Farnsworth, <dale@farnsworth.org>");