diff options
| author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-05-19 09:33:15 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 16:25:13 -0400 |
| commit | 25c5cc9194f241d9180b4ca76a1845efd0a02769 (patch) | |
| tree | 2499a6f0254c1432b3f11a6463213614e084617c /drivers/media/platform/omap3isp | |
| parent | 9884a955a9da8488a88672a3eff40309bbd7f74f (diff) | |
[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>
Diffstat (limited to 'drivers/media/platform/omap3isp')
| -rw-r--r-- | drivers/media/platform/omap3isp/ispvideo.c | 5 |
1 files changed, 2 insertions, 3 deletions
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) | |||
| 631 | if (format->type != video->type) | 631 | if (format->type != video->type) |
| 632 | return -EINVAL; | 632 | return -EINVAL; |
| 633 | 633 | ||
| 634 | mutex_lock(&video->mutex); | ||
| 635 | |||
| 636 | /* Fill the bytesperline and sizeimage fields by converting to media bus | 634 | /* Fill the bytesperline and sizeimage fields by converting to media bus |
| 637 | * format and back to pixel format. | 635 | * format and back to pixel format. |
| 638 | */ | 636 | */ |
| 639 | isp_video_pix_to_mbus(&format->fmt.pix, &fmt); | 637 | isp_video_pix_to_mbus(&format->fmt.pix, &fmt); |
| 640 | isp_video_mbus_to_pix(video, &fmt, &format->fmt.pix); | 638 | isp_video_mbus_to_pix(video, &fmt, &format->fmt.pix); |
| 641 | 639 | ||
| 640 | mutex_lock(&video->mutex); | ||
| 642 | vfh->format = *format; | 641 | vfh->format = *format; |
| 643 | |||
| 644 | mutex_unlock(&video->mutex); | 642 | mutex_unlock(&video->mutex); |
| 643 | |||
| 645 | return 0; | 644 | return 0; |
| 646 | } | 645 | } |
| 647 | 646 | ||
