diff options
author | Marek Vasut <marex@denx.de> | 2017-06-07 15:34:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-20 08:12:20 -0300 |
commit | de2e04569d341988465dbd4651193942e8c6db6b (patch) | |
tree | ae245d55b2c50e2b7be6a2d45fb8df7677999e22 /drivers/staging/media/imx/imx6-mipi-csi2.c | |
parent | 21e54111d2558fa774aec998bba25c6fa5b61791 (diff) |
[media] media: imx: Drop warning upon multiple S_STREAM disable calls
Calling S_STREAM OFF multiple times on a video device is valid, although
dubious, practice. Instead of warning about it and setting stream count
lower than zero, just ignore the subsequent S_STREAM calls and correct
the stream count to zero.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/imx/imx6-mipi-csi2.c')
-rw-r--r-- | drivers/staging/media/imx/imx6-mipi-csi2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx6-mipi-csi2.c b/drivers/staging/media/imx/imx6-mipi-csi2.c index cae1cb278040..5061f3f524fd 100644 --- a/drivers/staging/media/imx/imx6-mipi-csi2.c +++ b/drivers/staging/media/imx/imx6-mipi-csi2.c @@ -397,7 +397,8 @@ static int csi2_s_stream(struct v4l2_subdev *sd, int enable) update_count: csi2->stream_count += enable ? 1 : -1; - WARN_ON(csi2->stream_count < 0); + if (csi2->stream_count < 0) + csi2->stream_count = 0; out: mutex_unlock(&csi2->lock); return ret; |