From 1d6629b1561ad34a6e6d17ece00bd65e1bab3724 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 10 Jan 2012 03:21:49 -0300 Subject: [media] convert drivers/media/* to use module_platform_driver() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch converts the drivers in drivers/media/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: Kyungmin Park Cc: Hans Verkuil Cc: "Richard Röjfors" Cc: "Matti J. Aaltonen" Cc: Lucas De Marchi Cc: Manjunath Hadli Cc: Muralidharan Karicheri Cc: Anatolij Gustschin Cc: Guennadi Liakhovetski Cc: Marek Szyprowski Cc: Robert Jarzmik Cc: Jonathan Corbet Cc: Daniel Drake Signed-off-by: Axel Lin Acked-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Acked-by: Marek Szyprowski Acked-by: Matti J. Aaltonen Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/omap24xxcam.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'drivers/media/video/omap24xxcam.c') diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 45522e60318..7d386414436 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c @@ -1868,21 +1868,7 @@ static struct platform_driver omap24xxcam_driver = { }, }; -/* - * - * Module initialisation and deinitialisation - * - */ - -static int __init omap24xxcam_init(void) -{ - return platform_driver_register(&omap24xxcam_driver); -} - -static void __exit omap24xxcam_cleanup(void) -{ - platform_driver_unregister(&omap24xxcam_driver); -} +module_platform_driver(omap24xxcam_driver); MODULE_AUTHOR("Sakari Ailus "); MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver"); @@ -1894,6 +1880,3 @@ MODULE_PARM_DESC(video_nr, module_param(capture_mem, int, 0); MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture " "buffers (default 4800kiB)"); - -module_init(omap24xxcam_init); -module_exit(omap24xxcam_cleanup); -- cgit v1.2.3-18-g5258