diff mbox series

[v8,18/38] media: ccs: No need to set streaming to false in power off

Message ID 20240313072516.241106-19-sakari.ailus@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Generic line based metadata support, internal pads | expand

Commit Message

Sakari Ailus March 13, 2024, 7:24 a.m. UTC
Streaming will have been stopped by the sensor is powered off, and so
sensor->streaming is also false already. Do not set it as part of the
runtime suspend callback.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/ccs/ccs-core.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Kieran Bingham March 13, 2024, 9:31 a.m. UTC | #1
Quoting Sakari Ailus (2024-03-13 07:24:56)
> Streaming will have been stopped by the sensor is powered off, and so

by the time the sensor

or

before the sensor

> sensor->streaming is also false already. Do not set it as part of the
> runtime suspend callback.
> 

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/media/i2c/ccs/ccs-core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index e21287d50c15..671540a8ab6a 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -1710,7 +1710,6 @@ static int ccs_power_off(struct device *dev)
>         usleep_range(5000, 5000);
>         regulator_bulk_disable(ARRAY_SIZE(ccs_regulators),
>                                sensor->regulators);
> -       sensor->streaming = false;
>  
>         return 0;
>  }
> -- 
> 2.39.2
>
Laurent Pinchart March 21, 2024, 4:35 p.m. UTC | #2
Hi Sakari,

Thank you for the patch.

On Wed, Mar 13, 2024 at 09:24:56AM +0200, Sakari Ailus wrote:
> Streaming will have been stopped by the sensor is powered off, and so
> sensor->streaming is also false already. Do not set it as part of the
> runtime suspend callback.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  drivers/media/i2c/ccs/ccs-core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index e21287d50c15..671540a8ab6a 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -1710,7 +1710,6 @@ static int ccs_power_off(struct device *dev)
>  	usleep_range(5000, 5000);
>  	regulator_bulk_disable(ARRAY_SIZE(ccs_regulators),
>  			       sensor->regulators);
> -	sensor->streaming = false;
>  
>  	return 0;
>  }
diff mbox series

Patch

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index e21287d50c15..671540a8ab6a 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -1710,7 +1710,6 @@  static int ccs_power_off(struct device *dev)
 	usleep_range(5000, 5000);
 	regulator_bulk_disable(ARRAY_SIZE(ccs_regulators),
 			       sensor->regulators);
-	sensor->streaming = false;
 
 	return 0;
 }