diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/watchdog/at32ap700x_wdt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/watchdog/at32ap700x_wdt.c b/drivers/char/watchdog/at32ap700x_wdt.c index 75e852e954e7..54a516169d07 100644 --- a/drivers/char/watchdog/at32ap700x_wdt.c +++ b/drivers/char/watchdog/at32ap700x_wdt.c | |||
@@ -56,7 +56,7 @@ struct wdt_at32ap700x { | |||
56 | void __iomem *regs; | 56 | void __iomem *regs; |
57 | spinlock_t io_lock; | 57 | spinlock_t io_lock; |
58 | int timeout; | 58 | int timeout; |
59 | int users; | 59 | unsigned long users; |
60 | struct miscdevice miscdev; | 60 | struct miscdevice miscdev; |
61 | }; | 61 | }; |
62 | 62 | ||
@@ -68,8 +68,10 @@ static char expect_release; | |||
68 | */ | 68 | */ |
69 | static inline void at32_wdt_stop(void) | 69 | static inline void at32_wdt_stop(void) |
70 | { | 70 | { |
71 | unsigned long psel; | ||
72 | |||
71 | spin_lock(&wdt->io_lock); | 73 | spin_lock(&wdt->io_lock); |
72 | unsigned long psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); | 74 | psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); |
73 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0x55)); | 75 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0x55)); |
74 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0xaa)); | 76 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0xaa)); |
75 | spin_unlock(&wdt->io_lock); | 77 | spin_unlock(&wdt->io_lock); |