3a365900ff766aa36cd72e08cfc01cae97600afa
[openwrt/svn-archive/archive.git] / target / linux / au1000 / patches-2.6.27 / 005-mtx1_wdt_fix.patch
1 --- a/drivers/watchdog/mtx-1_wdt.c
2 +++ b/drivers/watchdog/mtx-1_wdt.c
3 @@ -98,6 +98,8 @@ static void mtx1_wdt_reset(void)
4
5 static void mtx1_wdt_start(void)
6 {
7 + unsigned long flags;
8 +
9 spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
10 if (!mtx1_wdt_device.queue) {
11 mtx1_wdt_device.queue = 1;
12 @@ -110,6 +112,8 @@ static void mtx1_wdt_start(void)
13
14 static int mtx1_wdt_stop(void)
15 {
16 + unsigned long flags;
17 +
18 spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
19 if (mtx1_wdt_device.queue) {
20 mtx1_wdt_device.queue = 0;