mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 08:12:41 -04:00
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
dd4191054b
commit
421ba86abf
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user