i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Mon, 24 Apr 2023 08:06:27 +0000 (10:06 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 3 May 2023 15:27:29 +0000 (17:27 +0200)
commitfa39065833dbdb2059ffe25d071e722c31fbbb6c
tree37a98a3beed7294ca0bd358f9753000c16a0d8d7
parentc770657bd2611b077ec1e7b1fe6aa92f249399bd
i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks

This is unsafe, as the runtime PM callbacks are called from the PM
workqueue, so this may deadlock when handling an i2c attached clock,
which may already hold the clk_prepare mutex from another context.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-imx-lpi2c.c