Re: [PATCH] video: mx3_camera: Allocate camera object via kzalloc

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

 



On Mon, 20 Feb 2012, Fabio Estevam wrote:

> Align mx3_camera driver with the other soc camera driver implementations
> by allocating the camera object via kzalloc.

Sorry, any specific reason, why you think this "aligning" is so important? 
I personally don't see any.

Thanks
Guennadi

> 
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> ---
>  drivers/media/video/mx3_camera.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c
> index 7452277..cccd574 100644
> --- a/drivers/media/video/mx3_camera.c
> +++ b/drivers/media/video/mx3_camera.c
> @@ -1159,7 +1159,7 @@ static int __devinit mx3_camera_probe(struct platform_device *pdev)
>  		goto egetres;
>  	}
>  
> -	mx3_cam = vzalloc(sizeof(*mx3_cam));
> +	mx3_cam = kzalloc(sizeof(*mx3_cam), GFP_KERNEL);
>  	if (!mx3_cam) {
>  		dev_err(&pdev->dev, "Could not allocate mx3 camera object\n");
>  		err = -ENOMEM;
> -- 
> 1.7.1
> 

---
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