[media] [3.6.0-,3/5] media/mx2_emmaprp: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 10 Oct 2012 17:33:52 +0000 (14:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 13:35:11 +0000 (11:35 -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/mx2_emmaprp.c

index 8f22ce543cf704315399b751371d79f8dfbd2c6e..c45a9f5e5f2b0f8b488f7bbbb82f9dac1866fcb9 100644 (file)
@@ -1013,16 +1013,4 @@ static struct platform_driver emmaprp_pdrv = {
                .owner  = THIS_MODULE,
        },
 };
-
-static void __exit emmaprp_exit(void)
-{
-       platform_driver_unregister(&emmaprp_pdrv);
-}
-
-static int __init emmaprp_init(void)
-{
-       return platform_driver_register(&emmaprp_pdrv);
-}
-
-module_init(emmaprp_init);
-module_exit(emmaprp_exit);
+module_platform_driver(emmaprp_pdrv);