]> www.infradead.org Git - users/jedix/linux-maple.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)
committerAndi Shyti <andi.shyti@kernel.org>
Fri, 27 Sep 2024 09:48:21 +0000 (11:48 +0200)
commit0c8d604dea437b69a861479b413d629bc9b3da70
treeb7c4e9f4dd88f0f1ff5b8c705c023606932b9e93
parent6d3405415f887aef5774c04ae9fefae63d82bdaf
i2c: xiic: 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.

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>
drivers/i2c/busses/i2c-xiic.c