From: Srinivas Kandagatla Date: Wed, 10 Oct 2012 17:33:52 +0000 (-0300) Subject: [media] [3.6.0-,3/5] media/mx2_emmaprp: use module_platform_driver macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0e368f302e897b8a6a14191dfc66d92bc354014f;p=openwrt%2Fstaging%2Fblogic.git [media] [3.6.0-,3/5] media/mx2_emmaprp: use module_platform_driver macro This patch removes some code duplication by using module_platform_driver. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index 8f22ce543cf7..c45a9f5e5f2b 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -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);