Skip to content

Commit dc3415f

Browse files
Jinjie RuanSasha Levin
authored andcommitted
media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled
commit 316e745 upstream. It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Cc: [email protected] Fixes: b50a64f ("media: amphion: add amphion vpu device driver") Signed-off-by: Jinjie Ruan <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3c6b7e9 commit dc3415f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/platform/amphion/vpu_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ static int vpu_probe(struct platform_device *pdev)
151151
media_device_cleanup(&vpu->mdev);
152152
v4l2_device_unregister(&vpu->v4l2_dev);
153153
err_vpu_deinit:
154-
pm_runtime_set_suspended(dev);
155154
pm_runtime_disable(dev);
155+
pm_runtime_set_suspended(dev);
156156

157157
return ret;
158158
}

0 commit comments

Comments
 (0)