]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PM / PM QoS: Fix reversed min and max
authorColin Cross <ccross@android.com>
Mon, 15 Nov 2010 21:45:22 +0000 (22:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:33:18 +0000 (13:33 -0800)
commit 00fafcda1773245a5292f953321ec3f0668c8c28 upstream.

pm_qos_get_value had min and max reversed, causing all pm_qos
requests to have no effect.

Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: mark <markgross@thegnar.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/pm_qos_params.c

index 645e541a45f6c9a9667c054bd7f5230ecaef67a3..0da2837416eb856652b978b14a20fd5c47fa797c 100644 (file)
@@ -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 */