aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Arcangeli <andrea@cpushare.com>2013-08-04 17:26:30 +0200
committercodeworkx <codeworkx@cyanogenmod.org>2013-08-04 17:26:30 +0200
commit26ecd9742bd036be3ee91d2ddec0a019ff4c0646 (patch)
treeb9d892a76371613c500f9b23f8b38ede839f1e7d
parent49c33dab8b7a57780affea28db976ccab8dc345b (diff)
downloadkernel_samsung_smdk4412-26ecd9742bd036be3ee91d2ddec0a019ff4c0646.zip
kernel_samsung_smdk4412-26ecd9742bd036be3ee91d2ddec0a019ff4c0646.tar.gz
kernel_samsung_smdk4412-26ecd9742bd036be3ee91d2ddec0a019ff4c0646.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: Ief78ed7ddb3eec85636844b9a730cac832b096b4
-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 {