diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-09-30 17:19:13 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-14 19:54:15 +0100 |
commit | e1cf8c117717d13f5ad002f15824dbccd0ba60f8 (patch) | |
tree | 0c19003e29994bb6b4108ef01e7f66d7a03e048a /drivers | |
parent | 6968bcb7fa6a532b849e0f2a598032e45ad4d59d (diff) | |
download | linux-e1cf8c117717d13f5ad002f15824dbccd0ba60f8.tar.gz linux-e1cf8c117717d13f5ad002f15824dbccd0ba60f8.tar.bz2 linux-e1cf8c117717d13f5ad002f15824dbccd0ba60f8.zip |
i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
commit 18599e93e4e814ce146186026c6abf83c14d5798 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: stable@vger.kernel.org # v5.17
Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240930091913.2545510-1-ruanjinjie@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i3c/master/svc-i3c-master.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index e71c90e5ac60..eca50705e9ce 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -1639,8 +1639,8 @@ static int svc_i3c_master_probe(struct platform_device *pdev) rpm_disable: pm_runtime_dont_use_autosuspend(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - pm_runtime_set_suspended(&pdev->dev); pm_runtime_disable(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); err_disable_clks: svc_i3c_master_unprepare_clks(master); |