linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] MMC: remove unbalanced pm_runtime_suspend()
@ 2011-04-19 10:46 Guennadi Liakhovetski
  2011-04-19 12:44 ` Ohad Ben-Cohen
  0 siblings, 1 reply; 27+ messages in thread
From: Guennadi Liakhovetski @ 2011-04-19 10:46 UTC (permalink / raw)
  To: linux-mmc; +Cc: Alan Stern, Magnus Damm, Simon Horman, Rafael J. Wysocki

MMC bus PM operations implement a .runtime_idle() method, which calls 
pm_runtime_suspend(), but this call is not balanced by a resume 
counterpart, which causes problems with repeated card-plug and driver-load 
cycles. Removing this method fixes the disbalance.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

With this patch and with v2 of the MMCIF PM patch, that I'll be posting 
shortly, I can load / unload the driver, insert and remove the card and 
suspend and wake up the system multiple times and each time the full PM 
cycle is performed, going down to the platform callbacks. However, it 
might well be, that there's a more correct way to achieve the same.

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 63667a8..44866a6 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -158,15 +158,9 @@ static int mmc_runtime_resume(struct device *dev)
 	return mmc_power_restore_host(card->host);
 }
 
-static int mmc_runtime_idle(struct device *dev)
-{
-	return pm_runtime_suspend(dev);
-}
-
 static const struct dev_pm_ops mmc_bus_pm_ops = {
 	.runtime_suspend	= mmc_runtime_suspend,
 	.runtime_resume		= mmc_runtime_resume,
-	.runtime_idle		= mmc_runtime_idle,
 };
 
 #define MMC_PM_OPS_PTR	(&mmc_bus_pm_ops)

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-04-28 22:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 10:46 [PATCH/RFC] MMC: remove unbalanced pm_runtime_suspend() Guennadi Liakhovetski
2011-04-19 12:44 ` Ohad Ben-Cohen
2011-04-19 13:23   ` Guennadi Liakhovetski
2011-04-19 14:16     ` Ohad Ben-Cohen
2011-04-19 14:26     ` Alan Stern
2011-04-19 22:59       ` Guennadi Liakhovetski
2011-04-20 14:22         ` Alan Stern
2011-04-20 14:50           ` Guennadi Liakhovetski
2011-04-20 15:12             ` Alan Stern
2011-04-20 20:06               ` Rafael J. Wysocki
2011-04-20 21:16                 ` Alan Stern
2011-04-20 21:44                   ` Rafael J. Wysocki
2011-04-21 13:58                     ` Alan Stern
2011-04-21 18:00                       ` Rafael J. Wysocki
2011-04-21 18:36                         ` Alan Stern
2011-04-21 20:05                           ` Rafael J. Wysocki
2011-04-21 21:48                             ` Alan Stern
2011-04-21 22:06                               ` Rafael J. Wysocki
2011-04-22 15:20                                 ` Alan Stern
2011-04-22 20:22                                   ` Rafael J. Wysocki
2011-04-22 20:25                                     ` Rafael J. Wysocki
2011-04-22 21:20                                       ` Alan Stern
2011-04-22 22:11                                         ` Rafael J. Wysocki
2011-04-25 10:29                                           ` [linux-pm] " Rafael J. Wysocki
2011-04-26 10:44                                             ` Guennadi Liakhovetski
2011-04-26 11:51                                               ` Rafael J. Wysocki
2011-04-28 22:12                                             ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).