diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2023-09-29 12:00:42 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-10-07 10:55:48 +0200 |
commit | 2428e585b1e79efc1ecc3eaf64ad777e1272b792 (patch) | |
tree | f2768ff4c5399c70839fe7bded8d4671e83a900e /drivers/media/i2c | |
parent | d8bca3ed1d70652e68b07799171d471026b7b3e2 (diff) | |
download | lwn-2428e585b1e79efc1ecc3eaf64ad777e1272b792.tar.gz lwn-2428e585b1e79efc1ecc3eaf64ad777e1272b792.zip |
media: ccs: Partially revert "media: i2c: Use pm_runtime_resume_and_get()"
ccs_pm_get_init() depends on the return values > 0 of
pm_runtime_get_sync(), thus it can't use pm_runtime_resume_and_get().
There's even a comment in the driver on this, a few lines above the code.
Fixes: aa0adb399d09 ("media: i2c: Use pm_runtime_resume_and_get()")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/ccs/ccs-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index c6853622946b..34f4f62a9523 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -1873,9 +1873,9 @@ static int ccs_pm_get_init(struct ccs_sensor *sensor) * relies at the returned value to detect if the device was already * active or not. */ - rval = pm_runtime_resume_and_get(&client->dev); - if (rval) - return rval; + rval = pm_runtime_get_sync(&client->dev); + if (rval < 0) + goto error; /* Device was already active, so don't set controls */ if (rval == 1) |