[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240923035115.3008900-3-ruanjinjie@huawei.com>
Date: Mon, 23 Sep 2024 11:51:14 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <sakari.ailus@...ux.intel.com>, <mchehab@...nel.org>, <ming.qian@....com>,
<eagle.zhou@....com>, <stanimir.k.varbanov@...il.com>,
<quic_vgarodia@...cinc.com>, <bryan.odonoghue@...aro.org>,
<hans.verkuil@...co.com>, <linux-media@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH 2/3] 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.
Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
drivers/media/platform/amphion/vpu_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/amphion/vpu_drv.c b/drivers/media/platform/amphion/vpu_drv.c
index 2bf70aafd2ba..51d5234869f5 100644
--- a/drivers/media/platform/amphion/vpu_drv.c
+++ b/drivers/media/platform/amphion/vpu_drv.c
@@ -151,8 +151,8 @@ static int vpu_probe(struct platform_device *pdev)
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;
}
--
2.34.1
Powered by blists - more mailing lists