]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 12:53:52 +0000 (14:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:29 +0000 (17:16 +0200)
commit004cce9adbdff676a401ea207e62a8a26db151b1
tree36045859d4e48d5c4100934efafa2ff8c8266cc1
parentf3dd6698761ef8afabe06aefb3fd4cb5f489ff9d
spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind

commit 5e8bb0cc72f1d52d8ac2a88f4c952e2e98056aed upstream.

Make sure to balance the runtime PM usage count before returning on
probe failure (to allow the controller to suspend after a probe
deferral) and to only drop the usage count on driver unbind to avoid a
clock disable imbalance.

Also restore the autosuspend setting.

Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support")
Cc: stable@vger.kernel.org # 6.7
Cc: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-cadence-quadspi.c