1
0
Fork 0

[WATCHDOG] fix mtx1_wdt compilation failure

Using spin_lock_irqsave with a local variable called flags without
declaring is a bad idea, fix this by declaring it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
hifive-unleashed-5.1
Florian Fainelli 2008-10-24 19:52:56 +02:00 committed by Wim Van Sebroeck
parent ed313489ba
commit f80e919bb4
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,8 @@ static void mtx1_wdt_reset(void)
static void mtx1_wdt_start(void)
{
unsigned long flags;
spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
if (!mtx1_wdt_device.queue) {
mtx1_wdt_device.queue = 1;
@ -110,6 +112,8 @@ static void mtx1_wdt_start(void)
static int mtx1_wdt_stop(void)
{
unsigned long flags;
spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
if (mtx1_wdt_device.queue) {
mtx1_wdt_device.queue = 0;