aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAndrea Arcangeli <andrea@cpushare.com>2013-08-04 10:29:46 +0200
committerAndrea Arcangeli <andrea@cpushare.com>2013-08-04 12:33:48 +0200
commit06b6513043b7c39692dbd5e041e5b3fe194a1897 (patch)
treea9f1cddeb15fce7c383e375e5970544439d4ac7c /drivers/mmc
parent84c11baf1cd2873665c9bd51f720ee3d83faefa2 (diff)
downloadkernel_samsung_smdk4412-06b6513043b7c39692dbd5e041e5b3fe194a1897.zip
kernel_samsung_smdk4412-06b6513043b7c39692dbd5e041e5b3fe194a1897.tar.gz
kernel_samsung_smdk4412-06b6513043b7c39692dbd5e041e5b3fe194a1897.tar.bz2
mmc: fix the workqueue overload battery waste
After switching to the smdk4412 kernel I noticed a workqueue overload, battery lasting less, and Android OS showing up at the top as result. Tracing showed that mmc_host_clk_gate_work was one of the runqueues called regularly in the background. The #ifdef is clearly reversed and that leads to the ndelay being called every time, while ndelay was never called before. Not yet sure if this fixes the "apparent" regression but it's not bad so far, after 1h of uptime android OS is below Android System. Change-Id: Ib908b0c20c4bc8dd889d0d228ee3ea63820b98cf
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/host.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 7966957..67758bf 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -110,12 +110,12 @@ static void mmc_host_clk_gate_delayed(struct mmc_host *host)
if (!host->clk_requests) {
spin_unlock_irqrestore(&host->clk_lock, flags);
/* wait only when clk_gate_delay is 0 */
-#ifdef CONFIG_WIMAX_CMC
+#ifndef CONFIG_WIMAX_CMC
if (!host->clkgate_delay) {
#endif
tick_ns = DIV_ROUND_UP(1000000000, freq);
ndelay(host->clk_delay * tick_ns);
-#ifdef CONFIG_WIMAX_CMC
+#ifndef CONFIG_WIMAX_CMC
}
#endif
} else {