X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fshwdt.c;h=cdc7138be301cd3e3fb6600a8bb5d870771a3342;hb=10865dfa34e7552c4c64606edcdf1e21a110c985;hp=824125adf90a5ac9fefbedbf3b0f99267275b4c9;hpb=0c06090c9472db0525cb6fe229c3bea33bbbbb3c;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 824125a..cdc7138 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #define PFX "shwdt: " @@ -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; @@ -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)); @@ -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); } /** @@ -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); } /** @@ -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); } /** @@ -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; } @@ -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; @@ -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); } /**