Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650089
| From | Steve Longerbeam <slongerbeam@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v7 34/34] media: imx: Drop warning upon multiple S_STREAM disable calls |
| Date | 2017-05-25 02:40 +0200 |
| Message-ID | <tKOYQ-Xd-73@gated-at.bofh.it> (permalink) |
| References | <tKOYN-Xd-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Marek Vasut <marex@denx.de> 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> --- drivers/staging/media/imx/imx-ic-prp.c | 3 ++- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media/imx/imx-media-csi.c | 3 ++- drivers/staging/media/imx/imx-media-vdic.c | 3 ++- drivers/staging/media/imx/imx6-mipi-csi2.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/imx/imx-ic-prp.c b/drivers/staging/media/imx/imx-ic-prp.c index 7bc293a..c34367e 100644 --- a/drivers/staging/media/imx/imx-ic-prp.c +++ b/drivers/staging/media/imx/imx-ic-prp.c @@ -387,7 +387,8 @@ static int prp_s_stream(struct v4l2_subdev *sd, int enable) update_count: priv->stream_count += enable ? 1 : -1; - WARN_ON(priv->stream_count < 0); + if (priv->stream_count < 0) + priv->stream_count = 0; out: mutex_unlock(&priv->lock); return ret; diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 5e9c817..ed363fe 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -1140,7 +1140,8 @@ static int prp_s_stream(struct v4l2_subdev *sd, int enable) update_count: priv->stream_count += enable ? 1 : -1; - WARN_ON(priv->stream_count < 0); + if (priv->stream_count < 0) + priv->stream_count = 0; out: mutex_unlock(&priv->lock); return ret; diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 4ab401d..0ec3176 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -861,7 +861,8 @@ static int csi_s_stream(struct v4l2_subdev *sd, int enable) update_count: priv->stream_count += enable ? 1 : -1; - WARN_ON(priv->stream_count < 0); + if (priv->stream_count < 0) + priv->stream_count = 0; out: mutex_unlock(&priv->lock); return ret; diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c index c0b6d7f..7eabdc4 100644 --- a/drivers/staging/media/imx/imx-media-vdic.c +++ b/drivers/staging/media/imx/imx-media-vdic.c @@ -536,7 +536,8 @@ static int vdic_s_stream(struct v4l2_subdev *sd, int enable) update_count: priv->stream_count += enable ? 1 : -1; - WARN_ON(priv->stream_count < 0); + if (priv->stream_count < 0) + priv->stream_count = 0; out: mutex_unlock(&priv->lock); return ret; diff --git a/drivers/staging/media/imx/imx6-mipi-csi2.c b/drivers/staging/media/imx/imx6-mipi-csi2.c index 49bc2c2..cfaf34a 100644 --- a/drivers/staging/media/imx/imx6-mipi-csi2.c +++ b/drivers/staging/media/imx/imx6-mipi-csi2.c @@ -396,7 +396,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; -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v7 00/34] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 05/34] ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 21/34] media: imx: Add Capture Device Interface Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 25/34] media: imx: Add MIPI CSI-2 Receiver subdev driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 13/34] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 31/34] media: imx: csi: add frame size/interval enumeration Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 14/34] ARM: dts: imx6-sabreauto: add the ADV7180 video decoder Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 27/34] media: imx: csi: add support for bayer formats Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 08/34] ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 28/34] media: imx: csi: increase burst size for YUV formats Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 30/34] media: imx: csi: add sink selection rectangles Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 09/34] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 19/34] media: Add userspace header file for i.MX Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 12/34] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 06/34] ARM: dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 15/34] add mux and video interface bridge entity functions Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
Re: [PATCH v7 15/34] add mux and video interface bridge entity functions Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 15:40 +0200
Re: [PATCH v7 15/34] add mux and video interface bridge entity functions Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 16:00 +0200
Re: [PATCH v7 15/34] add mux and video interface bridge entity functions Philipp Zabel <p.zabel@pengutronix.de> - 2017-05-29 16:00 +0200
[PATCH v7 29/34] media: imx: csi: add frame skipping support Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 04/34] ARM: dts: imx6qdl: add multiplexer controls Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 26/34] ARM: imx_v6_v7_defconfig: Enable staging video4linux drivers Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 01/34] dt-bindings: Add bindings for video-multiplexer device Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 23/34] media: imx: Add VDIC subdev driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 18/34] platform: video-mux: include temporary mmio-mux support Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
Re: [PATCH v7 18/34] platform: video-mux: include temporary mmio-mux support kbuild test robot <lkp@intel.com> - 2017-05-25 10:00 +0200
[PATCH] platform: video-mux: fix ptr_ret.cocci warnings kbuild test robot <lkp@intel.com> - 2017-05-25 10:00 +0200
[PATCH v7 17/34] platform: add video-multiplexer subdevice driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 34/34] media: imx: Drop warning upon multiple S_STREAM disable calls Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:40 +0200
[PATCH v7 02/34] [media] dt-bindings: Add bindings for i.MX media driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:50 +0200
[PATCH v7 10/34] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-25 02:50 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 15:50 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Philipp Zabel <p.zabel@pengutronix.de> - 2017-05-29 16:20 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 16:30 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 17:30 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-05-29 17:40 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 18:30 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-29 20:20 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Pavel Machek <pavel@ucw.cz> - 2017-05-31 22:20 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-29 19:30 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-29 19:30 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-05-30 00:00 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-05-30 09:00 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-06-03 20:10 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-06-04 20:10 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-06-07 14:40 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Pavel Machek <pavel@ucw.cz> - 2017-05-31 22:00 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-06-01 10:30 +0200
exposure vs. exposure_absolute was Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Pavel Machek <pavel@ucw.cz> - 2017-06-01 10:50 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-06-03 21:40 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Pavel Machek <pavel@ucw.cz> - 2017-06-03 22:00 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-06-04 00:00 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Pavel Machek <pavel@ucw.cz> - 2017-06-04 00:20 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-06-04 06:50 +0200
Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-06-07 14:40 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Tim Harvey <tharvey@gateworks.com> - 2017-06-02 02:30 +0200
Re: [PATCH v7 00/34] i.MX Media Driver Steve Longerbeam <slongerbeam@gmail.com> - 2017-06-02 02:50 +0200
csiph-web