]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: cadence: fix unclocked access on unbind
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 12:36:12 +0000 (14:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:29 +0000 (17:16 +0200)
commit02bcd5b06c7c8b971091084be55fe950e28283ab
treeb03e50cd893e3ba85f3413324c7a4228c063774b
parent3759892d8653ba178053f68415a01bb9571bdd0f
spi: cadence: fix unclocked access on unbind

commit 5b1689a41f02955c5361944f748a4812a6ff9307 upstream.

Make sure that the controller is runtime resumed before disabling it
during driver unbind to avoid unclocked register access and unbalanced
clock disable.

Also restore the autosuspend setting.

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

Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Cc: stable@vger.kernel.org # 4.7
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=1
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-cadence.c