[media] media/m2m: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 10 Oct 2012 17:33:46 +0000 (14:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 13:34:29 +0000 (11:34 -0200)
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/m2m-deinterlace.c

index 45164c4f8452975d2bbd12978b3c6d9ff8229118..fcdbb2744ebb15b1db8d408ee7eec3b28038653f 100644 (file)
@@ -1108,17 +1108,5 @@ static struct platform_driver deinterlace_pdrv = {
                .owner  = THIS_MODULE,
        },
 };
-
-static void __exit deinterlace_exit(void)
-{
-       platform_driver_unregister(&deinterlace_pdrv);
-}
-
-static int __init deinterlace_init(void)
-{
-       return platform_driver_register(&deinterlace_pdrv);
-}
-
-module_init(deinterlace_init);
-module_exit(deinterlace_exit);
+module_platform_driver(deinterlace_pdrv);