]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] soc_camera: Use module_platform_driver macro
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 5 Sep 2012 11:25:27 +0000 (08:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 6 Oct 2012 12:12:13 +0000 (09:12 -0300)
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/soc_camera/soc_camera.c

index d9b53569459c2a161c1fd58eaaaef54165769599..1234767a55bcba85759433b89bd3433c6ff72269 100644 (file)
@@ -1586,18 +1586,7 @@ static struct platform_driver __refdata soc_camera_pdrv = {
        },
 };
 
-static int __init soc_camera_init(void)
-{
-       return platform_driver_register(&soc_camera_pdrv);
-}
-
-static void __exit soc_camera_exit(void)
-{
-       platform_driver_unregister(&soc_camera_pdrv);
-}
-
-module_init(soc_camera_init);
-module_exit(soc_camera_exit);
+module_platform_driver(soc_camera_pdrv);
 
 MODULE_DESCRIPTION("Image capture bus driver");
 MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>");