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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable)
			return ret;
		}
		ret = v4l2_subdev_call(state->src_sd, core, s_power, 1);
		if (ret < 0)
		if (ret < 0 && ret != -ENOIOCTLCMD)
			return ret;
	}

@@ -649,6 +649,8 @@ static int mipi_csis_s_stream(struct v4l2_subdev *mipi_sd, int enable)
	} else {
		v4l2_subdev_call(state->src_sd, video, s_stream, 0);
		ret = v4l2_subdev_call(state->src_sd, core, s_power, 0);
		if (ret == -ENOIOCTLCMD)
			ret = 0;
		mipi_csis_stop_stream(state);
		state->flags &= ~ST_STREAMING;
		if (state->debug)