diff options
| author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-11-04 04:52:10 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-12-03 14:55:32 -0500 |
| commit | c3dbc70d825968da10cf6fdde40447aeec632a2d (patch) | |
| tree | 439c6b4cb7d731b20e16f45f6e04f6315269911d | |
| parent | 4a62361f825325bd6dd228d3c05e254d40f74e47 (diff) | |
[media] v4l: omap4iss: Move code out of mutex-protected section
The pad::get_fmt call must be protected by a mutex, but preparing its
arguments doesn't need to be. Move the non-critical code out of the
mutex-protected section.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| -rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index 63419b3769b5..68006231cc41 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c | |||
| @@ -243,12 +243,11 @@ __iss_video_get_format(struct iss_video *video, struct v4l2_format *format) | |||
| 243 | if (subdev == NULL) | 243 | if (subdev == NULL) |
| 244 | return -EINVAL; | 244 | return -EINVAL; |
| 245 | 245 | ||
| 246 | mutex_lock(&video->mutex); | ||
| 247 | |||
| 248 | fmt.pad = pad; | 246 | fmt.pad = pad; |
| 249 | fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; | 247 | fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; |
| 250 | ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt); | ||
| 251 | 248 | ||
| 249 | mutex_lock(&video->mutex); | ||
| 250 | ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt); | ||
| 252 | mutex_unlock(&video->mutex); | 251 | mutex_unlock(&video->mutex); |
| 253 | 252 | ||
| 254 | if (ret) | 253 | if (ret) |
