lkml.org 
[lkml]   [2010]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pm_qos: Fix reversed min and max
Date
pm_qos_get_value had min and max reversed, causing all pm_qos
requests to have no effect.

Change-Id: I252c764821eac8d94de57eb482c05bf6afcea15b
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: mark gross <markgross@thegnar.org>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
---
kernel/pm_qos_params.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c
index 645e541..0da2837 100644
--- a/kernel/pm_qos_params.c
+++ b/kernel/pm_qos_params.c
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)

switch (o->type) {
case PM_QOS_MIN:
- return plist_last(&o->requests)->prio;
+ return plist_first(&o->requests)->prio;

case PM_QOS_MAX:
- return plist_first(&o->requests)->prio;
+ return plist_last(&o->requests)->prio;

default:
/* runtime check for not using enum */
--
1.7.3.1


\
 
 \ /
  Last update: 2010-11-04 07:45    [W:0.025 / U:2.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site