Skip to content

Commit

Permalink
[WATCHDOG] fix mtx1_wdt compilation failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and Wim Van Sebroeck committed Nov 21, 2008
1 parent ed31348 commit f80e919
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/watchdog/mtx-1_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit f80e919

Please sign in to comment.