diff options
| author | Sakari Ailus <[email protected]> | 2025-01-10 12:50:27 +0000 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2025-02-15 14:22:50 +0000 |
| commit | e04604583095faf455b3490b004254a225fd60d4 (patch) | |
| tree | 6f801ca7a8ff0d490c57bb5f7a0f88449644b837 /drivers/media/i2c/ccs/ccs-core.c | |
| parent | media: stm32: dcmipp: add has_csi2 & needs_mclk in match data (diff) | |
| download | kernel-e04604583095faf455b3490b004254a225fd60d4.tar.gz kernel-e04604583095faf455b3490b004254a225fd60d4.zip | |
media: i2c: ccs: Set the device's runtime PM status correctly in remove
Set the device's runtime PM status to suspended in device removal only if
it wasn't suspended already.
Fixes: 9447082ae666 ("[media] smiapp: Implement power-on and power-off sequences without runtime PM")
Cc: [email protected] # for >= v5.15
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs-core.c')
| -rw-r--r-- | drivers/media/i2c/ccs/ccs-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 2cdab2f3d9dc..45b317216aba 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3595,9 +3595,10 @@ static void ccs_remove(struct i2c_client *client) v4l2_async_unregister_subdev(subdev); pm_runtime_disable(&client->dev); - if (!pm_runtime_status_suspended(&client->dev)) + if (!pm_runtime_status_suspended(&client->dev)) { ccs_power_off(&client->dev); - pm_runtime_set_suspended(&client->dev); + pm_runtime_set_suspended(&client->dev); + } for (i = 0; i < sensor->ssds_used; i++) v4l2_device_unregister_subdev(&sensor->ssds[i].sd); |
