[media] media/ir_rx51: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 10 Oct 2012 17:34:07 +0000 (14:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 13:36:29 +0000 (11:36 -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/rc/ir-rx51.c

index 546199e9ccc7268f1600a7bc89415b96b10566f2..8cfe3166bb5416906ed6fd843a1faf5ee65703df 100644 (file)
@@ -480,18 +480,7 @@ struct platform_driver lirc_rx51_platform_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init lirc_rx51_init(void)
-{
-       return platform_driver_register(&lirc_rx51_platform_driver);
-}
-module_init(lirc_rx51_init);
-
-static void __exit lirc_rx51_exit(void)
-{
-       platform_driver_unregister(&lirc_rx51_platform_driver);
-}
-module_exit(lirc_rx51_exit);
+module_platform_driver(lirc_rx51_platform_driver);
 
 MODULE_DESCRIPTION("LIRC TX driver for Nokia RX51");
 MODULE_AUTHOR("Nokia Corporation");