]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: orion: fix runtime pm leak on unbind
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 13:02:09 +0000 (15:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:28 +0000 (17:16 +0200)
commitdabab3183ae1ba15babae2cd20a813bcd1d8d761
tree1b62b8c6c9846363ba6ce3f121cee65defafadd7
parente701f3ea11563d5770ecbbd5c90ef3f53f62845c
spi: orion: fix runtime pm leak on unbind

commit 97b17dd8266d2e26d9ee3c75a0fa34ecde6944f0 upstream.

Make sure to balance the runtime PM usage count on driver unbind so that
the controller can be suspended when a driver is rebound.

Also restore the autosuspend setting.

This issue was flagged by Sashiko when reviewing a controller
deregistration fix.

Fixes: 5c6786945b4e ("spi: spi-orion: add runtime PM support")
Cc: stable@vger.kernel.org # 3.17
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=6
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421130211.1537628-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-orion.c