]> git.hungrycats.org Git - linux/commit
i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 30 Sep 2024 09:19:13 +0000 (17:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:33:07 +0000 (10:33 +0100)
commit0a0dc4834f664eb36ba76fdb8b0ca719dfe1b18f
tree2800437c6f9a921dc5d62b0bd60a79e215e25d5c
parentcdcc26d714c96e9de75c549f05d770b3ddaf2d21
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>
drivers/i3c/master/svc-i3c-master.c