aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sc520_wdt.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-11-01 19:27:08 -0400
committerWim Van Sebroeck <wim@iguana.be>2007-11-02 15:09:07 -0400
commitc7dfd0cca300c5dc49213cf1c78c77393600410d (patch)
tree5a4a5ecb5ab0215113eacf763a9d15500a02b0ee /drivers/watchdog/sc520_wdt.c
parent2ba7d7b39f3adf3f71aa3acab00111a429056c7d (diff)
[WATCHDOG] spin_lock_init() fixes
Some watchdog drivers initialize global spinlocks in module's init function which is tolerable, but some do it in PCI probe function. So, switch to static initialization to fix theoretical bugs and, more importantly, stop giving people bad examples. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/watchdog/sc520_wdt.c')
-rw-r--r--drivers/watchdog/sc520_wdt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c
index e8594c64d1e6..2847324a2be2 100644
--- a/drivers/watchdog/sc520_wdt.c
+++ b/drivers/watchdog/sc520_wdt.c
@@ -125,7 +125,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
125static unsigned long next_heartbeat; 125static unsigned long next_heartbeat;
126static unsigned long wdt_is_open; 126static unsigned long wdt_is_open;
127static char wdt_expect_close; 127static char wdt_expect_close;
128static spinlock_t wdt_spinlock; 128static DEFINE_SPINLOCK(wdt_spinlock);
129 129
130/* 130/*
131 * Whack the dog 131 * Whack the dog
@@ -383,8 +383,6 @@ static int __init sc520_wdt_init(void)
383{ 383{
384 int rc = -EBUSY; 384 int rc = -EBUSY;
385 385
386 spin_lock_init(&wdt_spinlock);
387
388 /* Check that the timeout value is within it's range ; if not reset to the default */ 386 /* Check that the timeout value is within it's range ; if not reset to the default */
389 if (wdt_set_heartbeat(timeout)) { 387 if (wdt_set_heartbeat(timeout)) {
390 wdt_set_heartbeat(WATCHDOG_TIMEOUT); 388 wdt_set_heartbeat(WATCHDOG_TIMEOUT);