mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 00:59:55 -04:00
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>
This commit is contained in:
committed by
Hans Verkuil
parent
d8bca3ed1d
commit
2428e585b1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user