summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/lantiq_wdt.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-07 23:07:41 +0200
committerArnd Bergmann <arnd@arndb.de>2011-10-07 23:07:41 +0200
commit8efc59ad6764ade520012cb192cd484e5191cd9c (patch)
treed2465d91ebb2652e35cd08f715fc202b3f9e042a /drivers/watchdog/lantiq_wdt.c
parent6f6184a9d01880a3e21349544f73b3720ce5e152 (diff)
parent492c4a0df11573e141a2decc6012b3bddd14a11e (diff)
Merge branch 'sirf/cleanup' into next/cleanup
Diffstat (limited to 'drivers/watchdog/lantiq_wdt.c')
-rw-r--r--drivers/watchdog/lantiq_wdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
index 7d82adac1cb..102aed0efbf 100644
--- a/drivers/watchdog/lantiq_wdt.c
+++ b/drivers/watchdog/lantiq_wdt.c
@@ -51,16 +51,16 @@ static int ltq_wdt_ok_to_close;
static void
ltq_wdt_enable(void)
{
- ltq_wdt_timeout = ltq_wdt_timeout *
+ unsigned long int timeout = ltq_wdt_timeout *
(ltq_io_region_clk_rate / LTQ_WDT_DIVIDER) + 0x1000;
- if (ltq_wdt_timeout > LTQ_MAX_TIMEOUT)
- ltq_wdt_timeout = LTQ_MAX_TIMEOUT;
+ if (timeout > LTQ_MAX_TIMEOUT)
+ timeout = LTQ_MAX_TIMEOUT;
/* write the first password magic */
ltq_w32(LTQ_WDT_PW1, ltq_wdt_membase + LTQ_WDT_CR);
/* write the second magic plus the configuration and new timeout */
ltq_w32(LTQ_WDT_SR_EN | LTQ_WDT_SR_PWD | LTQ_WDT_SR_CLKDIV |
- LTQ_WDT_PW2 | ltq_wdt_timeout, ltq_wdt_membase + LTQ_WDT_CR);
+ LTQ_WDT_PW2 | timeout, ltq_wdt_membase + LTQ_WDT_CR);
}
static void