* [PATCH v2] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev
@ 2013-11-04 14:03 Laurent Pinchart
2013-11-04 14:14 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2013-11-04 14:03 UTC (permalink / raw)
To: linux-media; +Cc: sakari.ailus
The remote subdev of any video node in the OMAP3 ISP is an internal
subdev that is guaranteed to implement get_fmt. Don't check the return
value for -ENOIOCTLCMD, as this can't happen.
While at it, move non-critical code out of the mutex-protected section.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/platform/omap3isp/ispvideo.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index a908d00..f6304bb 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -339,14 +339,11 @@ __isp_video_get_format(struct isp_video *video, struct v4l2_format *format)
if (subdev == NULL)
return -EINVAL;
- mutex_lock(&video->mutex);
-
fmt.pad = pad;
fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
- ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
- if (ret == -ENOIOCTLCMD)
- ret = -EINVAL;
+ mutex_lock(&video->mutex);
+ ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
mutex_unlock(&video->mutex);
if (ret)
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev
2013-11-04 14:03 [PATCH v2] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev Laurent Pinchart
@ 2013-11-04 14:14 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2013-11-04 14:14 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media
On Mon, Nov 04, 2013 at 03:03:02PM +0100, Laurent Pinchart wrote:
> The remote subdev of any video node in the OMAP3 ISP is an internal
> subdev that is guaranteed to implement get_fmt. Don't check the return
> value for -ENOIOCTLCMD, as this can't happen.
>
> While at it, move non-critical code out of the mutex-protected section.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-04 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04 14:03 [PATCH v2] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev Laurent Pinchart
2013-11-04 14:14 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).