[PATCH] mmc: print debug messages for runtime PM actions

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

 



At
http://www.mail-archive.com/linux-mmc@xxxxxxxxxxxxxxx/msg08371.html
we found and fixed a bug where mmc's runtime power management functions
were not being called. We have now also made improvements to the SDIO
powerup routine which could possibly mask this kind of issue in future.

Add debug messages to the runtime PM hooks so that it is easy to verify
if and when runtime PM is happening.

Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx>
---
 drivers/mmc/core/core.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

For linux-3.1.

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 0a04886..ad0c55a 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1664,6 +1664,10 @@ int mmc_power_save_host(struct mmc_host *host)
 {
 	int ret = 0;
 
+#ifdef CONFIG_MMC_DEBUG
+	pr_info("%s: %s: powering down\n", mmc_hostname(host), __func__);
+#endif
+
 	mmc_bus_get(host);
 
 	if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {
@@ -1686,6 +1690,10 @@ int mmc_power_restore_host(struct mmc_host *host)
 {
 	int ret;
 
+#ifdef CONFIG_MMC_DEBUG
+	pr_info("%s: %s: powering up\n", mmc_hostname(host), __func__);
+#endif
+
 	mmc_bus_get(host);
 
 	if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux