Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192504
b: refs/heads/master
c: 25f3a5a
h: refs/heads/master
v: v3
  • Loading branch information
Mark Gross authored and Rafael J. Wysocki committed May 16, 2010
1 parent 1cae9e0 commit 5950e46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f77578cc2debaeb30a4ef6206f4ba10944bdcd8
refs/heads/master: 25f3a5a2854dce8b8413fd24cc9d5b9e3632be54
26 changes: 14 additions & 12 deletions trunk/kernel/pm_qos_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,21 @@ void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req,
int pending_update = 0;
s32 temp;

spin_lock_irqsave(&pm_qos_lock, flags);
if (new_value == PM_QOS_DEFAULT_VALUE)
temp = pm_qos_array[pm_qos_req->pm_qos_class]->default_value;
else
temp = new_value;

if (temp != pm_qos_req->value) {
pending_update = 1;
pm_qos_req->value = temp;
if (pm_qos_req) { /*guard against callers passing in null */
spin_lock_irqsave(&pm_qos_lock, flags);
if (new_value == PM_QOS_DEFAULT_VALUE)
temp = pm_qos_array[pm_qos_req->pm_qos_class]->default_value;
else
temp = new_value;

if (temp != pm_qos_req->value) {
pending_update = 1;
pm_qos_req->value = temp;
}
spin_unlock_irqrestore(&pm_qos_lock, flags);
if (pending_update)
update_target(pm_qos_req->pm_qos_class);
}
spin_unlock_irqrestore(&pm_qos_lock, flags);
if (pending_update)
update_target(pm_qos_req->pm_qos_class);
}
EXPORT_SYMBOL_GPL(pm_qos_update_request);

Expand Down

0 comments on commit 5950e46

Please sign in to comment.