diff options
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/autosleep.c | 2 | ||||
-rw-r--r-- | kernel/power/qos.c | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/kernel/power/autosleep.c b/kernel/power/autosleep.c index ca304046d9e2..c6422ffeda9a 100644 --- a/kernel/power/autosleep.c +++ b/kernel/power/autosleep.c | |||
@@ -66,7 +66,7 @@ static DECLARE_WORK(suspend_work, try_to_suspend); | |||
66 | 66 | ||
67 | void queue_up_suspend_work(void) | 67 | void queue_up_suspend_work(void) |
68 | { | 68 | { |
69 | if (!work_pending(&suspend_work) && autosleep_state > PM_SUSPEND_ON) | 69 | if (autosleep_state > PM_SUSPEND_ON) |
70 | queue_work(autosleep_wq, &suspend_work); | 70 | queue_work(autosleep_wq, &suspend_work); |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 9322ff7eaad6..587dddeebf15 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c | |||
@@ -359,8 +359,7 @@ void pm_qos_update_request(struct pm_qos_request *req, | |||
359 | return; | 359 | return; |
360 | } | 360 | } |
361 | 361 | ||
362 | if (delayed_work_pending(&req->work)) | 362 | cancel_delayed_work_sync(&req->work); |
363 | cancel_delayed_work_sync(&req->work); | ||
364 | 363 | ||
365 | if (new_value != req->node.prio) | 364 | if (new_value != req->node.prio) |
366 | pm_qos_update_target( | 365 | pm_qos_update_target( |
@@ -386,8 +385,7 @@ void pm_qos_update_request_timeout(struct pm_qos_request *req, s32 new_value, | |||
386 | "%s called for unknown object.", __func__)) | 385 | "%s called for unknown object.", __func__)) |
387 | return; | 386 | return; |
388 | 387 | ||
389 | if (delayed_work_pending(&req->work)) | 388 | cancel_delayed_work_sync(&req->work); |
390 | cancel_delayed_work_sync(&req->work); | ||
391 | 389 | ||
392 | if (new_value != req->node.prio) | 390 | if (new_value != req->node.prio) |
393 | pm_qos_update_target( | 391 | pm_qos_update_target( |
@@ -416,8 +414,7 @@ void pm_qos_remove_request(struct pm_qos_request *req) | |||
416 | return; | 414 | return; |
417 | } | 415 | } |
418 | 416 | ||
419 | if (delayed_work_pending(&req->work)) | 417 | cancel_delayed_work_sync(&req->work); |
420 | cancel_delayed_work_sync(&req->work); | ||
421 | 418 | ||
422 | pm_qos_update_target(pm_qos_array[req->pm_qos_class]->constraints, | 419 | pm_qos_update_target(pm_qos_array[req->pm_qos_class]->constraints, |
423 | &req->node, PM_QOS_REMOVE_REQ, | 420 | &req->node, PM_QOS_REMOVE_REQ, |