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

media: imx: imx7_mipi_csis: Make source .s_power() optional

The .s_power() subdev operation is optional, don't error out when the
source doesn't implement it.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent dd419105
...@@ -627,7 +627,7 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable) ...@@ -627,7 +627,7 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable)
return ret; return ret;
} }
ret = v4l2_subdev_call(state->src_sd, core, s_power, 1); ret = v4l2_subdev_call(state->src_sd, core, s_power, 1);
if (ret < 0) if (ret < 0 && ret != -ENOIOCTLCMD)
return ret; return ret;
} }
...@@ -649,6 +649,8 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable) ...@@ -649,6 +649,8 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable)
} else { } else {
v4l2_subdev_call(state->src_sd, video, s_stream, 0); v4l2_subdev_call(state->src_sd, video, s_stream, 0);
ret = v4l2_subdev_call(state->src_sd, core, s_power, 0); ret = v4l2_subdev_call(state->src_sd, core, s_power, 0);
if (ret == -ENOIOCTLCMD)
ret = 0;
mipi_csis_stop_stream(state); mipi_csis_stop_stream(state);
state->flags &= ~ST_STREAMING; state->flags &= ~ST_STREAMING;
if (state->debug) if (state->debug)
......
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