]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 23 Sep 2024 03:42:50 +0000 (11:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:47 +0000 (12:00 +0200)
commit9d1fa01dd17ed33266e237a4bc253cbae7f85738
tree1dc331ab61d7294f3fc103410dd23687aa75e67d
parent24781e20fcdf678954637b866da85f7eef1c13e7
i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled

commit 0c8d604dea437b69a861479b413d629bc9b3da70 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.

Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management")
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-xiic.c