aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/w83697hf_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/watchdog/w83697hf_wdt.c')
-rw-r--r--drivers/char/watchdog/w83697hf_wdt.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c
index b12f8b8..b3dcc81 100644
--- a/drivers/char/watchdog/w83697hf_wdt.c
+++ b/drivers/char/watchdog/w83697hf_wdt.c
@@ -83,8 +83,8 @@ w83697hf_lock(void)
}
/*
- * The two functions w83697hf_get_reg() and w83697hf_set_reg()
- * must be called with the device unlocked.
+ * The three functions w83697hf_get_reg(), w83697hf_set_reg() and
+ * w83697hf_write_timeout() must be called with the device unlocked.
*/
static unsigned char
@@ -102,6 +102,12 @@ w83697hf_set_reg(unsigned char reg, unsigned char data)
}
static void
+w83697hf_write_timeout(int timeout)
+{
+ w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */
+}
+
+static void
w83697hf_select_wdt(void)
{
w83697hf_unlock();
@@ -157,7 +163,7 @@ wdt_ctrl(int timeout)
w83697hf_select_wdt();
- w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */
+ w83697hf_write_timeout(timeout);
w83697hf_deselect_wdt();