diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-02-15 05:27:28 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-03-11 11:59:52 +0100 |
commit | 421ba86abfa6878dcf0095aeae4972fc78210bdd (patch) | |
tree | 979cdc1deae8615d5b17d18237282239468e7c5d /drivers | |
parent | dd4191054b92b08c585ab8ebaa68ac996398964d (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/imx/imx7-mipi-csis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 381eda94398a..c153a77c3784 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -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) |