Re: [PATCH 3.6.0- 4/5] media/soc_camera: use module_platform_driver macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Srinivas

On Wed, 10 Oct 2012, Srinivas KANDAGATLA wrote:

> From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>
> 
> This patch removes some code duplication by using
> module_platform_driver.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>

Thanks for the patch. It is indeed correct, but an identical patch is 
already upstream: 
http://git.linuxtv.org/media_tree.git/commit/ec0341b3b7817a5e8ebcf26091dde28dce2d7821

Thanks
Guennadi

> ---
>  drivers/media/platform/soc_camera/soc_camera.c |   14 +-------------
>  1 files changed, 1 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index 3be9294..d4bfe29 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1585,19 +1585,7 @@ static struct platform_driver __refdata soc_camera_pdrv = {
>  		.owner	= THIS_MODULE,
>  	},
>  };
> -
> -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@xxxxxxxxxxxxxx>");
> -- 
> 1.7.0.4
> 

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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux