Patchwork [v2,1/8] drivers: media: use module_platform_driver_probe()

login
register
mail settings
Submitter Fabio Porcedda
Date March 14, 2013, 5:09 p.m.
Message ID <1363280978-24051-2-git-send-email-fabio.porcedda@gmail.com>
Download mbox | patch
Permalink /patch/227759/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Fabio Porcedda - March 14, 2013, 5:09 p.m.
This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Josh Wu <josh.wu@atmel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
---
 drivers/media/platform/soc_camera/atmel-isi.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Guennadi Liakhovetski - March 14, 2013, 5:14 p.m.
On Thu, 14 Mar 2013, Fabio Porcedda wrote:

> This patch converts the drivers to use the
> module_platform_driver_probe() macro which makes the code smaller and
> a bit simpler.
> 
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>

Thanks, will queue for 3.10.

Regards
Guennadi

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: Josh Wu <josh.wu@atmel.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: linux-media@vger.kernel.org
> ---
>  drivers/media/platform/soc_camera/atmel-isi.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c
> index 82dbf99..12ba31d 100644
> --- a/drivers/media/platform/soc_camera/atmel-isi.c
> +++ b/drivers/media/platform/soc_camera/atmel-isi.c
> @@ -1081,17 +1081,7 @@ static struct platform_driver atmel_isi_driver = {
>  	},
>  };
>  
> -static int __init atmel_isi_init_module(void)
> -{
> -	return  platform_driver_probe(&atmel_isi_driver, &atmel_isi_probe);
> -}
> -
> -static void __exit atmel_isi_exit(void)
> -{
> -	platform_driver_unregister(&atmel_isi_driver);
> -}
> -module_init(atmel_isi_init_module);
> -module_exit(atmel_isi_exit);
> +module_platform_driver_probe(atmel_isi_driver, atmel_isi_probe);
>  
>  MODULE_AUTHOR("Josh Wu <josh.wu@atmel.com>");
>  MODULE_DESCRIPTION("The V4L2 driver for Atmel Linux");
> -- 
> 1.8.1.5
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c
index 82dbf99..12ba31d 100644
--- a/drivers/media/platform/soc_camera/atmel-isi.c
+++ b/drivers/media/platform/soc_camera/atmel-isi.c
@@ -1081,17 +1081,7 @@  static struct platform_driver atmel_isi_driver = {
 	},
 };
 
-static int __init atmel_isi_init_module(void)
-{
-	return  platform_driver_probe(&atmel_isi_driver, &atmel_isi_probe);
-}
-
-static void __exit atmel_isi_exit(void)
-{
-	platform_driver_unregister(&atmel_isi_driver);
-}
-module_init(atmel_isi_init_module);
-module_exit(atmel_isi_exit);
+module_platform_driver_probe(atmel_isi_driver, atmel_isi_probe);
 
 MODULE_AUTHOR("Josh Wu <josh.wu@atmel.com>");
 MODULE_DESCRIPTION("The V4L2 driver for Atmel Linux");