Commit ed1ac6e9 authored by Tejun Heo's avatar Tejun Heo Committed by Rafael J. Wysocki

PM: don't use [delayed_]work_pending()

There's no need to test whether a (delayed) work item is pending
before queueing, flushing or cancelling it, so remove work_pending()
tests used in those cases.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a4ca26a4
...@@ -66,7 +66,7 @@ static DECLARE_WORK(suspend_work, try_to_suspend); ...@@ -66,7 +66,7 @@ static DECLARE_WORK(suspend_work, try_to_suspend);
void queue_up_suspend_work(void) void queue_up_suspend_work(void)
{ {
if (!work_pending(&suspend_work) && autosleep_state > PM_SUSPEND_ON) if (autosleep_state > PM_SUSPEND_ON)
queue_work(autosleep_wq, &suspend_work); queue_work(autosleep_wq, &suspend_work);
} }
......
...@@ -359,7 +359,6 @@ void pm_qos_update_request(struct pm_qos_request *req, ...@@ -359,7 +359,6 @@ void pm_qos_update_request(struct pm_qos_request *req,
return; return;
} }
if (delayed_work_pending(&req->work))
cancel_delayed_work_sync(&req->work); cancel_delayed_work_sync(&req->work);
if (new_value != req->node.prio) if (new_value != req->node.prio)
...@@ -386,7 +385,6 @@ void pm_qos_update_request_timeout(struct pm_qos_request *req, s32 new_value, ...@@ -386,7 +385,6 @@ void pm_qos_update_request_timeout(struct pm_qos_request *req, s32 new_value,
"%s called for unknown object.", __func__)) "%s called for unknown object.", __func__))
return; return;
if (delayed_work_pending(&req->work))
cancel_delayed_work_sync(&req->work); cancel_delayed_work_sync(&req->work);
if (new_value != req->node.prio) if (new_value != req->node.prio)
...@@ -416,7 +414,6 @@ void pm_qos_remove_request(struct pm_qos_request *req) ...@@ -416,7 +414,6 @@ void pm_qos_remove_request(struct pm_qos_request *req)
return; return;
} }
if (delayed_work_pending(&req->work))
cancel_delayed_work_sync(&req->work); cancel_delayed_work_sync(&req->work);
pm_qos_update_target(pm_qos_array[req->pm_qos_class]->constraints, pm_qos_update_target(pm_qos_array[req->pm_qos_class]->constraints,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment