[PATCH 01/10] staging: mt7621-mmc: Fix power management by removing old api

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

 



The mmc_suspend|resume_host functions have been decrepated in the
3.11 [1] release and were completely removed in 3.13 [2]. Removing the
calls to this functions as it was done for other mmc host drivers
before the old api was removed (eg. [3]) fixes compile errors in this
driver while CONFIG_PM is enabled.

The rest of the removed code is simply dead, the MSDC_SYS_SUSPEND flag
is always set and will be removed in a later patch.

[1] commit 986892ca78ee ("mmc: core: Initiate suspend|resume from mmc bus instead of mmc host")
[2] commit 3c0d22e8180b ("mmc: core: Remove deprecated mmc_suspend|resume_host APIs")
[3] commit 1e63d4854202 ("mmc: au1xmmc: Move away from using deprecated APIs")

Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
---
 drivers/staging/mt7621-mmc/sd.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 24fdeb9e6173..63ec0e7360bc 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -858,13 +858,6 @@ static void msdc_pm(pm_message_t state, void *data)
 		host->suspend = 1;
 		host->pm_state = state;  /* default PMSG_RESUME */
 
-		INIT_MSG("%s Suspend", evt == PM_EVENT_SUSPEND ? "PM" : "USR");
-		if (host->hw->flags & MSDC_SYS_SUSPEND) /* set for card */ {
-			(void)mmc_suspend_host(host->mmc);
-		} else {
-			// host->mmc->pm_flags |= MMC_PM_IGNORE_PM_NOTIFY;  /* just for double confirm */ /* --- by chhung */
-			mmc_remove_host(host->mmc);
-		}
 	} else if (evt == PM_EVENT_RESUME || evt == PM_EVENT_USER_RESUME) {
 		if (!host->suspend) {
 			//ERR_MSG("warning: already resume");
@@ -880,13 +873,6 @@ static void msdc_pm(pm_message_t state, void *data)
 		host->suspend = 0;
 		host->pm_state = state;
 
-		INIT_MSG("%s Resume", evt == PM_EVENT_RESUME ? "PM" : "USR");
-		if (host->hw->flags & MSDC_SYS_SUSPEND) { /* will not set for WIFI */
-			(void)mmc_resume_host(host->mmc);
-		} else {
-			// host->mmc->pm_flags |= MMC_PM_IGNORE_PM_NOTIFY; /* --- by chhung */
-			mmc_add_host(host->mmc);
-		}
 	}
 }
 #endif
-- 
2.16.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux