aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/lantiq_wdt.c
diff options
context:
space:
mode:
authorArnd Bergmann2011-10-20 15:30:55 +0200
committerArnd Bergmann2011-10-20 15:30:55 +0200
commit29ea35969b92a4be122a58c4aceea8c5e2c388d9 (patch)
tree8285c0e98e7bb03868d390b58180e3cab876a8db /drivers/watchdog/lantiq_wdt.c
parent112d17d6f75b93e1dcaec2e2232a411148b3bf71 (diff)
parentb4cbb8a4e602ea77b0525d06eff89c6a6070dab3 (diff)
Merge branch 'imx/devel' into next/devel
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 7d82adac1cb2..102aed0efbf1 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