watchdog: da9062: use protection delay mechanism from core
"Linux Kernel Mailing List" <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.head |
|---|---|
| Message-ID | <[email protected]> |
Web: https://git.kernel.org/torvalds/c/fb484262f9ef0d73e0116b942c114bc48c6c7b3b Commit: fb484262f9ef0d73e0116b942c114bc48c6c7b3b Parent: f31b2a9bdeaea38957f4675ee0d1b8421595dc67 Refname: refs/heads/master Author: Michael Grzeschik <[email protected]> AuthorDate: Tue Oct 17 17:30:26 2017 +0200 Committer: Wim Van Sebroeck <[email protected]> CommitDate: Thu Dec 28 20:45:08 2017 +0100 watchdog: da9062: use protection delay mechanism from core This patch removes the windows protection routine that got now covered by the wdt core. Signed-off-by: Michael Grzeschik <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> --- drivers/watchdog/da9062_wdt.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index dbb970e87d3d..814dff6045a4 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -46,22 +46,6 @@ static void da9062_set_window_start(struct da9062_watchdog *wdt) wdt->j_time_stamp = jiffies; } -static void da9062_apply_window_protection(struct da9062_watchdog *wdt) -{ - unsigned long delay = msecs_to_jiffies(DA9062_RESET_PROTECTION_MS); - unsigned long timeout = wdt->j_time_stamp + delay; - unsigned long now = jiffies; - unsigned int diff_ms; - - /* if time-limit has not elapsed then wait for remainder */ - if (time_before(now, timeout)) { - diff_ms = jiffies_to_msecs(timeout-now); - dev_dbg(wdt->hw->dev, - "Kicked too quickly. Delaying %u msecs\n", diff_ms); - msleep(diff_ms); - } -} - static unsigned int da9062_wdt_timeout_to_sel(unsigned int secs) { unsigned int i; @@ -78,8 +62,6 @@ static int da9062_reset_watchdog_timer(struct da9062_watchdog *wdt) { int ret; - da9062_apply_window_protection(wdt);