]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:26:37 +0000 (08:26 +0900)
commit5e8bb0cc72f1d52d8ac2a88f4c952e2e98056aed
tree97200dc1b68851a4b8b0e0069c216ce0b51488b2
parent233db2cb14db8b1935dda52a6affd97276462b82
spi: cadence-quadspi: fix runtime pm and clock imbalance on unbind

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>
drivers/spi/spi-cadence-quadspi.c