summaryrefslogtreecommitdiff
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2012-04-23 18:11:58 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-24 01:37:00 -0700
commit1c15b86a58f6ebaeafe0d9f6dc4a30a673caf3b0 (patch)
treed981d207d0a6b4baa9e08c92c8c8415a2766eccc /drivers/cpuidle
parent25e382709afa7365ce7f544110b23a987716c5c3 (diff)
cpuidle: governor: menu: Initialize power usage to max
power_usage variable data type changed from unsigned int to int. -1 for unsigned int is max whereas for int it is less than 0. s->power_usage < power_usage always fails since power usage specified for Tegra CPU states is greater or equal to 0. Bug 971668 Change-Id: If2197f1c973e5774c3c46e2c1ac6ec83051d4e19 Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/98204 Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/governors/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index e8ddb44a7e08..a43a524220f9 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -240,7 +240,7 @@ static int menu_select(struct cpuidle_device *dev)
{
struct menu_device *data = &__get_cpu_var(menu_devices);
int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
- int power_usage = -1;
+ int power_usage = INT_MAX;
int i;
int multiplier;
struct timespec t;