From: Srinivas Kandagatla Date: Wed, 10 Oct 2012 17:33:46 +0000 (-0300) Subject: [media] media/m2m: use module_platform_driver macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50509e5cfe6cb7dffde71a454c3266fbb55fbff1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [media] media/m2m: 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/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c index 45164c4f8452..fcdbb2744ebb 100644 --- a/drivers/media/platform/m2m-deinterlace.c +++ b/drivers/media/platform/m2m-deinterlace.c @@ -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);