aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/workqueue.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a5361fc6215d..c77fdf6bf24f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1492,9 +1492,9 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq,
1492} 1492}
1493EXPORT_SYMBOL(queue_work_on); 1493EXPORT_SYMBOL(queue_work_on);
1494 1494
1495void delayed_work_timer_fn(unsigned long __data) 1495void delayed_work_timer_fn(struct timer_list *t)
1496{ 1496{
1497 struct delayed_work *dwork = (struct delayed_work *)__data; 1497 struct delayed_work *dwork = from_timer(dwork, t, timer);
1498 1498
1499 /* should have been called from irqsafe timer with irq already off */ 1499 /* should have been called from irqsafe timer with irq already off */
1500 __queue_work(dwork->cpu, dwork->wq, &dwork->work); 1500 __queue_work(dwork->cpu, dwork->wq, &dwork->work);
@@ -1508,8 +1508,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
1508 struct work_struct *work = &dwork->work; 1508 struct work_struct *work = &dwork->work;
1509 1509
1510 WARN_ON_ONCE(!wq); 1510 WARN_ON_ONCE(!wq);
1511 WARN_ON_ONCE(timer->function != delayed_work_timer_fn || 1511 WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)delayed_work_timer_fn);
1512 timer->data != (unsigned long)dwork);
1513 WARN_ON_ONCE(timer_pending(timer)); 1512 WARN_ON_ONCE(timer_pending(timer));
1514 WARN_ON_ONCE(!list_empty(&work->entry)); 1513 WARN_ON_ONCE(!list_empty(&work->entry));
1515 1514