diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-02-26 08:58:21 +0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-03-06 15:42:20 -0500 |
commit | c30fb26b116e4735597c46ff80cddb582c3c2727 (patch) | |
tree | 06ef8076a3e809614b60b7bc0e454c662f7e82c2 /kernel/workqueue.c | |
parent | c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff) |
workqueue: use setup_deferrable_timer
Use setup_deferrable_timer() instead of init_timer_deferrable() to
simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 072cbc9b175d..54a8fff43479 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3208,9 +3208,8 @@ static int init_worker_pool(struct worker_pool *pool) INIT_LIST_HEAD(&pool->idle_list); hash_init(pool->busy_hash); - init_timer_deferrable(&pool->idle_timer); - pool->idle_timer.function = idle_worker_timeout; - pool->idle_timer.data = (unsigned long)pool; + setup_deferrable_timer(&pool->idle_timer, idle_worker_timeout, + (unsigned long)pool); setup_timer(&pool->mayday_timer, pool_mayday_timeout, (unsigned long)pool); |