]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: spi-cadence: Fix pm_runtime_set_suspended() with runtime pm enabled
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 23 Sep 2024 04:00:14 +0000 (12:00 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 30 Sep 2024 20:55:00 +0000 (21:55 +0100)
commit67d4a70faa662df07451e83db1546d3ca0695e08
tree57676a346b1d7668fcdd081c730225e1c973326a
parentb6e05ba0844139dde138625906015c974c86aa93
spi: spi-cadence: 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: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240923040015.3009329-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c