diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2007-07-03 19:59:29 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-07-05 07:37:44 +0200 |
commit | 7e2a1498a90aff0e57271bf838a29aaa4e1c6bf9 (patch) | |
tree | a920c7b8639278695e27b2b652e07e2975ea82b3 /drivers/char/watchdog | |
parent | [WATCHDOG] at32ap700x_wdt.c - Add spinlock support (diff) | |
download | linux-7e2a1498a90aff0e57271bf838a29aaa4e1c6bf9.tar.xz linux-7e2a1498a90aff0e57271bf838a29aaa4e1c6bf9.zip |
[WATCHDOG] at32ap700x_wdt.c - Fix compilation warnings
Fix warning:
* ISO C90 forbids mixed declarations and code
* passing argument 2 of ‘test_and_set_bit’ from incompatible pointer type
* passing argument 2 of ‘clear_bit’ from incompatible pointer type
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/char/watchdog')
-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 { void __iomem *regs; spinlock_t io_lock; int timeout; - int users; + unsigned long users; struct miscdevice miscdev; }; @@ -68,8 +68,10 @@ static char expect_release; */ static inline void at32_wdt_stop(void) { + unsigned long psel; + spin_lock(&wdt->io_lock); - unsigned long psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); + psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0x55)); wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0xaa)); spin_unlock(&wdt->io_lock); |