All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Rudenko <mike.rudenko@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH 22/57] media: i2c: ov4689: Drop check for reentrant .s_stream()
Date: Fri, 15 Sep 2023 22:26:28 +0300	[thread overview]
Message-ID: <87jzsrut4i.fsf@gmail.com> (raw)
In-Reply-To: <20230914181704.4811-23-laurent.pinchart@ideasonboard.com>


On 2023-09-14 at 21:16 +03, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:

> The subdev .s_stream() operation shall not be called to start streaming
> on an already started subdev, or stop streaming on a stopped subdev.
> Remove the check that guards against that condition.
>
> The streaming field of the driver's private structure is now unused,
> drop it as well.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/i2c/ov4689.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
> index fda217d2cb10..cd8d7131e747 100644
> --- a/drivers/media/i2c/ov4689.c
> +++ b/drivers/media/i2c/ov4689.c
> @@ -100,7 +100,6 @@ struct ov4689 {
>  	u32 clock_rate;
>
>  	struct mutex mutex; /* lock to protect streaming, ctrls and cur_mode */
> -	bool streaming;

We can now drop the mention of "streaming" from the comment one line
above. Aside from that,

Reviewed-by: Mikhail Rudenko <mike.rudenko@gmail.com>

>  	struct v4l2_ctrl_handler ctrl_handler;
>  	struct v4l2_ctrl *exposure;
>
> @@ -468,10 +467,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
>
>  	mutex_lock(&ov4689->mutex);
>
> -	on = !!on;
> -	if (on == ov4689->streaming)
> -		goto unlock_and_return;
> -
>  	if (on) {
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  		if (ret < 0)
> @@ -504,8 +499,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
>  		pm_runtime_put(&client->dev);
>  	}
>
> -	ov4689->streaming = on;
> -
>  unlock_and_return:
>  	mutex_unlock(&ov4689->mutex);


--
Best regards,
Mikhail Rudenko

  reply	other threads:[~2023-09-15 19:36 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 18:16 [PATCH 00/57] media: i2c: Reduce cargo cult Laurent Pinchart
2023-09-14 18:16 ` [PATCH 01/57] media: v4l2-subdev: Document .s_stream() operation requirements Laurent Pinchart
2023-09-18  7:49   ` Ricardo Ribalda Delgado
2023-09-18  8:08     ` Laurent Pinchart
2023-09-14 18:16 ` [PATCH 02/57] media: i2c: hi556: Drop check for reentrant .s_stream() Laurent Pinchart
2023-09-14 18:16 ` [PATCH 03/57] media: i2c: hi846: " Laurent Pinchart
2023-09-26  7:18   ` Martin Kepplinger
2023-09-14 18:16 ` [PATCH 04/57] media: i2c: imx208: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 05/57] media: i2c: imx214: " Laurent Pinchart
2023-09-18  7:52   ` Ricardo Ribalda Delgado
2023-09-18  8:07     ` Laurent Pinchart
2023-09-14 18:16 ` [PATCH 06/57] media: i2c: imx219: " Laurent Pinchart
2023-09-15 10:49   ` Dave Stevenson
2023-09-14 18:16 ` [PATCH 07/57] media: i2c: imx258: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 08/57] media: i2c: imx319: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 09/57] media: i2c: imx334: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 10/57] media: i2c: imx335: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 11/57] media: i2c: imx355: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 12/57] media: i2c: imx412: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 13/57] media: i2c: mt9m001: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 14/57] media: i2c: og01a1b: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 15/57] media: i2c: ov01a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 16/57] media: i2c: ov08d10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 17/57] media: i2c: ov08x40: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 18/57] media: i2c: ov13858: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 19/57] media: i2c: ov13b10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 20/57] media: i2c: ov2685: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 21/57] media: i2c: ov2740: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 22/57] media: i2c: ov4689: " Laurent Pinchart
2023-09-15 19:26   ` Mikhail Rudenko [this message]
2023-09-18  6:55     ` Sakari Ailus
2023-09-14 18:16 ` [PATCH 23/57] media: i2c: ov5647: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 24/57] media: i2c: ov5670: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 25/57] media: i2c: ov5675: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 26/57] media: i2c: ov5695: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 27/57] media: i2c: ov7740: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 28/57] media: i2c: ov8856: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 29/57] media: i2c: ov9282: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 30/57] media: i2c: ov9734: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 31/57] Documentation: media: camera-sensor: Fix typo and vocabulary selection Laurent Pinchart
2023-09-14 18:16 ` [PATCH 32/57] Documentation: media: camera-sensor: Use link to upstream DT bindings Laurent Pinchart
2023-09-14 18:16 ` [PATCH 33/57] Documentation: media: camera-sensor: Move power management section Laurent Pinchart
2023-09-14 18:16 ` [PATCH 34/57] Documentation: media: camera-sensor: Improve power management documentation Laurent Pinchart
2023-09-14 18:16 ` [PATCH 35/57] media: i2c: ar0521: Drop system suspend and resume handlers Laurent Pinchart
2023-09-15  4:23   ` Krzysztof Hałasa
2023-09-14 18:16 ` [PATCH 36/57] media: i2c: ccs: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 37/57] media: i2c: hi556: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 38/57] media: i2c: hi846: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 39/57] media: i2c: hi847: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 40/57] media: i2c: imx208: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 41/57] media: i2c: imx214: " Laurent Pinchart
2023-09-18  7:53   ` Ricardo Ribalda Delgado
2023-09-14 18:16 ` [PATCH 42/57] media: i2c: imx219: " Laurent Pinchart
2023-09-15 10:53   ` Dave Stevenson
2023-09-15 11:35     ` Laurent Pinchart
2023-09-14 18:16 ` [PATCH 43/57] media: i2c: imx258: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 44/57] media: i2c: imx319: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 45/57] media: i2c: imx355: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 46/57] media: i2c: og01a1b: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 47/57] media: i2c: ov01a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 48/57] media: i2c: ov02a10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 49/57] media: i2c: ov08d10: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 50/57] media: i2c: ov08x40: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 51/57] media: i2c: ov13858: " Laurent Pinchart
2023-09-14 18:16 ` [PATCH 52/57] media: i2c: ov2740: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 53/57] media: i2c: ov13b10: Drop stream handling in runtime PM handlers Laurent Pinchart
2023-09-14 18:17 ` [PATCH 54/57] media: i2c: ov5670: Drop system suspend and resume handlers Laurent Pinchart
2023-09-14 18:17 ` [PATCH 55/57] media: i2c: ov5675: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 56/57] media: i2c: ov8856: " Laurent Pinchart
2023-09-14 18:17 ` [PATCH 57/57] media: i2c: ov9734: " Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzsrut4i.fsf@gmail.com \
    --to=mike.rudenko@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.