dde_linux: fix mod_delayed_work(delay)

'delay' is a relative timeout while mod_timer() needs an absolute point
in time.
This commit is contained in:
Christian Helmuth 2017-11-23 17:44:16 +01:00
parent 2b649cb633
commit 64c8b06377
2 changed files with 2 additions and 2 deletions

View File

@ -702,7 +702,7 @@ bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,
setup_timer(&dwork->timer, execute_delayed_work,
(unsigned long)dwork);
}
mod_timer(&dwork->timer, delay);
mod_timer(&dwork->timer, jiffies + delay);
}
return true;
}

View File

@ -1437,7 +1437,7 @@ bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,
if (delay == 0) {
execute_delayed_work((unsigned long)dwork);
} else {
mod_timer(&dwork->timer, delay);
mod_timer(&dwork->timer, jiffies + delay);
}
return true;
}