[RFC PATCH] mmc: tmio: properly balance RPM on remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Because we enabled the device with _noresume, we should disable it with
_noidle to match the ref counting of the clocks during remove().

Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---

I think this is the proper fix to the problem Geert reported [1]. I am
not sure about a proper Fixes-tag, though. The corresponding _noidle
call in the probe()-error-path was added with:

aa86f1a38875 ("mmc: tmio: Fixup runtime PM management during probe")

However, from my understanding this is more fitting?

1b32999e205b ("mmc: tmio: Avoid boilerplate code in ->runtime_suspend()")

But maybe my understanding of the situation is still not perfect and
even the commit message is bogus? Ulf, since both mentioned commits are
from you, could you have a look? Thanks in advance!

   Wolfram

[1] Message-ID: <alpine.DEB.2.21.2004291630090.4052@xxxxxxxxxxxxxx>

 drivers/mmc/host/tmio_mmc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 9520bd94cf43..9a4ae954553b 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1235,7 +1235,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	if (host->native_hotplug)
 		pm_runtime_put_noidle(&pdev->dev);
-	pm_runtime_put_sync(&pdev->dev);
+	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 }
 EXPORT_SYMBOL_GPL(tmio_mmc_host_remove);
-- 
2.20.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux