Commit c62e2a19 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] omap3isp: Don't fail streamon when the sensor doesn't implement s_stream

The code handles subdevs with no s_stream operation correctly, but
returns -ENOIOCTLCMD by mistake if the first subdev in the chain has no
s_stream operation. Return 0 in that case.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1e393e90
...@@ -732,7 +732,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe, ...@@ -732,7 +732,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
struct media_pad *pad; struct media_pad *pad;
struct v4l2_subdev *subdev; struct v4l2_subdev *subdev;
unsigned long flags; unsigned long flags;
int ret = 0; int ret;
spin_lock_irqsave(&pipe->lock, flags); spin_lock_irqsave(&pipe->lock, flags);
pipe->state &= ~(ISP_PIPELINE_IDLE_INPUT | ISP_PIPELINE_IDLE_OUTPUT); pipe->state &= ~(ISP_PIPELINE_IDLE_INPUT | ISP_PIPELINE_IDLE_OUTPUT);
...@@ -756,7 +756,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe, ...@@ -756,7 +756,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
ret = v4l2_subdev_call(subdev, video, s_stream, mode); ret = v4l2_subdev_call(subdev, video, s_stream, mode);
if (ret < 0 && ret != -ENOIOCTLCMD) if (ret < 0 && ret != -ENOIOCTLCMD)
break; return ret;
if (subdev == &isp->isp_ccdc.subdev) { if (subdev == &isp->isp_ccdc.subdev) {
v4l2_subdev_call(&isp->isp_aewb.subdev, video, v4l2_subdev_call(&isp->isp_aewb.subdev, video,
...@@ -777,7 +777,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe, ...@@ -777,7 +777,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
if (pipe->do_propagation && mode == ISP_PIPELINE_STREAM_SINGLESHOT) if (pipe->do_propagation && mode == ISP_PIPELINE_STREAM_SINGLESHOT)
atomic_inc(&pipe->frame_number); atomic_inc(&pipe->frame_number);
return ret; return 0;
} }
static int isp_pipeline_wait_resizer(struct isp_device *isp) static int isp_pipeline_wait_resizer(struct isp_device *isp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment