diff mbox series

[13/75] media: imx: capture: Remove capture_priv stop field

Message ID 20210105152852.5733-14-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: imx: Miscellaneous fixes and cleanups for i.MX7 | expand

Commit Message

Laurent Pinchart Jan. 5, 2021, 3:27 p.m. UTC
The stop field in the capture_priv structure is only set, never read.
Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/staging/media/imx/imx-media-capture.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Philipp Zabel Jan. 6, 2021, 2:29 p.m. UTC | #1
On Tue, 2021-01-05 at 17:27 +0200, Laurent Pinchart wrote:
> The stop field in the capture_priv structure is only set, never read.
> Drop it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/staging/media/imx/imx-media-capture.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index dd3861a96cb8..4f9cff62eb1f 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -45,8 +45,6 @@ struct capture_priv {
>  	spinlock_t q_lock;			/* Protect ready_q */
>  
>  	struct v4l2_ctrl_handler ctrl_hdlr;	/* Controls inherited from subdevs */
> -
> -	bool stop;				/* streaming is stopping */
>  };
>  
>  #define to_capture_priv(v) container_of(v, struct capture_priv, vdev)
> @@ -573,8 +571,6 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
>  		goto return_bufs;
>  	}
>  
> -	priv->stop = false;
> -
>  	return 0;
>  
>  return_bufs:
> @@ -595,10 +591,6 @@ static void capture_stop_streaming(struct vb2_queue *vq)
>  	unsigned long flags;
>  	int ret;
>  
> -	spin_lock_irqsave(&priv->q_lock, flags);
> -	priv->stop = true;
> -	spin_unlock_irqrestore(&priv->q_lock, flags);
> -
>  	ret = imx_media_pipeline_set_stream(priv->md, &priv->src_sd->entity,
>  					    false);
>  	if (ret)

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index dd3861a96cb8..4f9cff62eb1f 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -45,8 +45,6 @@  struct capture_priv {
 	spinlock_t q_lock;			/* Protect ready_q */
 
 	struct v4l2_ctrl_handler ctrl_hdlr;	/* Controls inherited from subdevs */
-
-	bool stop;				/* streaming is stopping */
 };
 
 #define to_capture_priv(v) container_of(v, struct capture_priv, vdev)
@@ -573,8 +571,6 @@  static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
 		goto return_bufs;
 	}
 
-	priv->stop = false;
-
 	return 0;
 
 return_bufs:
@@ -595,10 +591,6 @@  static void capture_stop_streaming(struct vb2_queue *vq)
 	unsigned long flags;
 	int ret;
 
-	spin_lock_irqsave(&priv->q_lock, flags);
-	priv->stop = true;
-	spin_unlock_irqrestore(&priv->q_lock, flags);
-
 	ret = imx_media_pipeline_set_stream(priv->md, &priv->src_sd->entity,
 					    false);
 	if (ret)