From: Laurent Pinchart Date: Mon, 19 May 2014 13:33:15 +0000 (-0300) Subject: [media] omap3isp: Move non-critical code out of the mutex-protected section X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=25c5cc9194f241d9180b4ca76a1845efd0a02769;p=linux-beck.git [media] omap3isp: Move non-critical code out of the mutex-protected section The isp_video_pix_to_mbus() and isp_video_mbus_to_pix() calls in isp_video_set_format() only access static fields of the isp_video structure. They don't need to be protected by a mutex. Signed-off-by: Laurent Pinchart Tested-by: Enrico Butera Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 04d45e70d3be..2876f34b84c0 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -631,17 +631,16 @@ isp_video_set_format(struct file *file, void *fh, struct v4l2_format *format) if (format->type != video->type) return -EINVAL; - mutex_lock(&video->mutex); - /* Fill the bytesperline and sizeimage fields by converting to media bus * format and back to pixel format. */ isp_video_pix_to_mbus(&format->fmt.pix, &fmt); isp_video_mbus_to_pix(video, &fmt, &format->fmt.pix); + mutex_lock(&video->mutex); vfh->format = *format; - mutex_unlock(&video->mutex); + return 0; }