]> git.karo-electronics.de Git - linux-beck.git/blobdiff - kernel/pm_qos_params.c
Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle...
[linux-beck.git] / kernel / pm_qos_params.c
index a96b850ba08a6a47dc9c9bd624849c4fbfe99349..aeaa7f8468216eb1d8795b14ff74cfc502318771 100644 (file)
@@ -121,10 +121,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 */
@@ -399,7 +399,7 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
        } else
                return -EINVAL;
 
-       pm_qos_req = (struct pm_qos_request_list *)filp->private_data;
+       pm_qos_req = filp->private_data;
        pm_qos_update_request(pm_qos_req, value);
 
        return count;