Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108136
b: refs/heads/master
c: 58cf419
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Bunk authored and Wim Van Sebroeck committed Aug 10, 2008
1 parent 26324df commit 51cc50f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8494e061799905dc2eb787c148cfbfb134b928f
refs/heads/master: 58cf41984a3791e7a516641f107ff70bd844ef72
24 changes: 12 additions & 12 deletions trunk/drivers/watchdog/shwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <linux/mm.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>
#include <asm/watchdog.h>

#define PFX "shwdt: "

Expand Down Expand Up @@ -68,7 +68,7 @@ static int clock_division_ratio = WTCSR_CKS_4096;
static void sh_wdt_ping(unsigned long data);

static unsigned long shwdt_is_open;
static struct watchdog_info sh_wdt_info;
static const struct watchdog_info sh_wdt_info;
static char shwdt_expect_close;
static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0);
static unsigned long next_heartbeat;
Expand All @@ -89,7 +89,7 @@ static void sh_wdt_start(void)
__u8 csr;
unsigned long flags;

spin_lock_irqsave(&wdt_lock, flags);
spin_lock_irqsave(&shwdt_lock, flags);

next_heartbeat = jiffies + (heartbeat * HZ);
mod_timer(&timer, next_ping_period(clock_division_ratio));
Expand Down Expand Up @@ -127,7 +127,7 @@ static void sh_wdt_start(void)
csr &= ~RSTCSR_RSTS;
sh_wdt_write_rstcsr(csr);
#endif
spin_unlock_irqrestore(&wdt_lock, flags);
spin_unlock_irqrestore(&shwdt_lock, flags);
}

/**
Expand All @@ -139,14 +139,14 @@ static void sh_wdt_stop(void)
__u8 csr;
unsigned long flags;

spin_lock_irqsave(&wdt_lock, flags);
spin_lock_irqsave(&shwdt_lock, flags);

del_timer(&timer);

csr = sh_wdt_read_csr();
csr &= ~WTCSR_TME;
sh_wdt_write_csr(csr);
spin_unlock_irqrestore(&wdt_lock, flags);
spin_unlock_irqrestore(&shwdt_lock, flags);
}

/**
Expand All @@ -157,9 +157,9 @@ static inline void sh_wdt_keepalive(void)
{
unsigned long flags;

spin_lock_irqsave(&wdt_lock, flags);
spin_lock_irqsave(&shwdt_lock, flags);
next_heartbeat = jiffies + (heartbeat * HZ);
spin_unlock_irqrestore(&wdt_lock, flags);
spin_unlock_irqrestore(&shwdt_lock, flags);
}

/**
Expand All @@ -173,9 +173,9 @@ static int sh_wdt_set_heartbeat(int t)
if (unlikely(t < 1 || t > 3600)) /* arbitrary upper limit */
return -EINVAL;

spin_lock_irqsave(&wdt_lock, flags);
spin_lock_irqsave(&shwdt_lock, flags);
heartbeat = t;
spin_unlock_irqrestore(&wdt_lock, flags);
spin_unlock_irqrestore(&shwdt_lock, flags);
return 0;
}

Expand All @@ -189,7 +189,7 @@ static void sh_wdt_ping(unsigned long data)
{
unsigned long flags;

spin_lock_irqsave(&wdt_lock, flags);
spin_lock_irqsave(&shwdt_lock, flags);
if (time_before(jiffies, next_heartbeat)) {
__u8 csr;

Expand All @@ -203,7 +203,7 @@ static void sh_wdt_ping(unsigned long data)
} else
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping "
"the watchdog\n");
spin_unlock_irqrestore(&wdt_lock, flags);
spin_unlock_irqrestore(&shwdt_lock, flags);
}

/**
Expand Down

0 comments on commit 51cc50f

Please sign in to comment.