[lkml]   [2012]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 05/25] devfreq: don't use [delayed_]work_pending()
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it. Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from devfreq. Only compile tested.

Signed-off-by: Tejun Heo <>
Cc: MyungJoo Ham <>
Cc: Kyungmin Park <>
Please let me know how this patch should be routed. I can take it
through the workqueue tree if necessary.


drivers/devfreq/devfreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 53766f3..fb4695e 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -291,8 +291,7 @@ void devfreq_monitor_resume(struct devfreq *devfreq)
if (!devfreq->stop_polling)
goto out;

- if (!delayed_work_pending(&devfreq->work) &&
- devfreq->profile->polling_ms)
+ if (devfreq->profile->polling_ms)
queue_delayed_work(devfreq_wq, &devfreq->work,
devfreq->stop_polling = false;

 \ /
  Last update: 2012-12-22 03:41    [W:0.359 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site