Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jinjie Ruan and committed by
Andi Shyti
0c8d604d 6d340541

+1 -1
+1 -1
drivers/i2c/busses/i2c-xiic.c
··· 1337 1337 return 0; 1338 1338 1339 1339 err_pm_disable: 1340 - pm_runtime_set_suspended(&pdev->dev); 1341 1340 pm_runtime_disable(&pdev->dev); 1341 + pm_runtime_set_suspended(&pdev->dev); 1342 1342 1343 1343 return ret; 1344 1344 }