Use nsecs_to_jiffies() to calculate the number of jiffies for the next
timeout instead of dancing around with div_u64().
Signed-off-by: Daniel Mack <daniel@zonque.org>
}
/* rearm delayed work with next timeout */
- if (deadline != ~0ULL) {
- u64 usecs = div_u64(deadline - now, 1000ULL);
+ if (deadline != ~0ULL)
+ schedule_delayed_work(&conn->work,
+ nsecs_to_jiffies(deadline - now));
- schedule_delayed_work(&conn->work, usecs_to_jiffies(usecs));
- }
mutex_unlock(&conn->lock);
kdbus_notify_flush(conn->bus);