From: Aaron Lu Date: Wed, 28 Dec 2011 03:11:12 +0000 (+0800) Subject: mmc: sdhci: Fix tuning timer incorrect setting when suspending host X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c6ced0db08010ed75df221a2946c5228454b38d5;p=deliverable%2Flinux.git mmc: sdhci: Fix tuning timer incorrect setting when suspending host When suspending host, the tuning timer shoule be deactivated. And the HOST_NEEDS_TUNING flag should be set after tuning timer is deactivated. Signed-off-by: Philip Rakity Signed-off-by: Aaron Lu Acked-by: Adrian Hunter Cc: stable Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index e06299734f5d..988ae06d1a09 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2356,9 +2356,8 @@ int sdhci_suspend_host(struct sdhci_host *host) /* Disable tuning since we are suspending */ if (host->version >= SDHCI_SPEC_300 && host->tuning_count && host->tuning_mode == SDHCI_TUNING_MODE_1) { + del_timer_sync(&host->tuning_timer); host->flags &= ~SDHCI_NEEDS_RETUNING; - mod_timer(&host->tuning_timer, jiffies + - host->tuning_count * HZ); } ret = mmc_suspend_host(host->mmc);