summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-09-05 08:25:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-06 09:12:13 -0300
commitec0341b3b7817a5e8ebcf26091dde28dce2d7821 (patch)
tree71beeee9102e40a05bfdc93b64581174cc3e72c3 /drivers/media
parent1aeed35575c39a4716cd7e0103cb1bb4fe6c8c8a (diff)
downloadtalos-obmc-linux-ec0341b3b7817a5e8ebcf26091dde28dce2d7821.tar.gz
talos-obmc-linux-ec0341b3b7817a5e8ebcf26091dde28dce2d7821.zip
[media] soc_camera: Use module_platform_driver macro
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index d9b53569459c..1234767a55bc 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -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>");
OpenPOWER on IntegriCloud