static inline void watchdog_update_worker(struct watchdog_device *wdd) { struct watchdog_core_data *wd_data = wdd->wd_data; if (watchdog_need_worker(wdd)) { long t = watchdog_next_keepalive(wdd); if (t > 0) mod_delayed_work(watchdog_wq, &wd_data->work, t); } else { cancel_delayed_work(&wd_data->work); } }
static inline void watchdog_update_worker(struct watchdog_device *wdd) { struct watchdog_core_data *wd_data = wdd->wd_data; if (watchdog_need_worker(wdd)) { ktime_t t = watchdog_next_keepalive(wdd); if (t > 0) hrtimer_start(&wd_data->timer, t, HRTIMER_MODE_REL); } else { hrtimer_cancel(&wd_data->timer); } }