mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
media: rkisp1: use pm_runtime_resume_and_get()
Commit dd8088d5a8 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
added pm_runtime_resume_and_get() in order to automatically handle
dev->power.usage_count decrement on errors.
Use the new API, in order to cleanup the error check logic.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
c311f53362
commit
8102cf89ec
|
|
@ -1003,9 +1003,8 @@ rkisp1_vb2_start_streaming(struct vb2_queue *queue, unsigned int count)
|
|||
if (ret)
|
||||
goto err_pipeline_stop;
|
||||
|
||||
ret = pm_runtime_get_sync(cap->rkisp1->dev);
|
||||
ret = pm_runtime_resume_and_get(cap->rkisp1->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(cap->rkisp1->dev);
|
||||
dev_err(cap->rkisp1->dev, "power up failed %d\n", ret);
|
||||
goto err_destroy_dummy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user