diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-11-01 17:40:49 +0800 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2024-11-07 09:05:57 +0100 |
commit | 316e74500d1c6589cba28cebe2864a0bceeb2396 (patch) | |
tree | a733943484c0eaf5dddea581b3e6bad15b746487 /drivers/media/platform | |
parent | d6594d50761728d09f23238cf9c368bab6260ef3 (diff) | |
download | linux-316e74500d1c6589cba28cebe2864a0bceeb2396.tar.gz linux-316e74500d1c6589cba28cebe2864a0bceeb2396.tar.bz2 linux-316e74500d1c6589cba28cebe2864a0bceeb2396.zip |
media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled
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: stable@vger.kernel.org
Fixes: b50a64fc54af ("media: amphion: add amphion vpu device driver")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/amphion/vpu_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/amphion/vpu_drv.c b/drivers/media/platform/amphion/vpu_drv.c index c6cbcaf433ee..efbfd2652721 100644 --- a/drivers/media/platform/amphion/vpu_drv.c +++ b/drivers/media/platform/amphion/vpu_drv.c @@ -151,8 +151,8 @@ err_add_decoder: media_device_cleanup(&vpu->mdev); v4l2_device_unregister(&vpu->v4l2_dev); err_vpu_deinit: - pm_runtime_set_suspended(dev); pm_runtime_disable(dev); + pm_runtime_set_suspended(dev); return ret; } |