mmc: sunxi-mmc: Fix clock refcount imbalance during unbind
authorSamuel Holland <samuel@sholland.org>
Wed, 10 Aug 2022 02:25:09 +0000 (21:25 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 2 Jan 2023 14:57:36 +0000 (15:57 +0100)
commit8509419758f2cc28dd05370385af0d91573b76b4
tree1c69b504201863988fa4f83fbc3f3a40f9f40372
parent1e336aa0c0250ec84c6f16efac40c9f0138e367d
mmc: sunxi-mmc: Fix clock refcount imbalance during unbind

If the controller is suspended by runtime PM, the clock is already
disabled, so do not try to disable it again during removal. Use
pm_runtime_disable() to flush any pending runtime PM transitions.

Fixes: 9a8e1e8cc2c0 ("mmc: sunxi: Add runtime_pm support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220810022509.43743-1-samuel@sholland.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sunxi-mmc.c