[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 <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Laurent Pinchart 2014-05-19 10:33:15 -03:00 committed by Mauro Carvalho Chehab
parent 9884a955a9
commit 25c5cc9194
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}