提交 7e2a1498 编写于 作者: W Wim Van Sebroeck

[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: NHans-Christian Egtvedt <hcegtvedt@atmel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
上级 e75e6577
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册