workqueue: use setup_deferrable_timer
authorGeliang Tang <geliangtang@gmail.com>
Sun, 26 Feb 2017 00:58:21 +0000 (08:58 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 6 Mar 2017 20:42:20 +0000 (15:42 -0500)
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>
kernel/workqueue.c

index 072cbc9..54a8fff 100644 (file)
@@ -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);