diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-11-01 19:27:08 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-11-02 15:09:07 -0400 |
commit | c7dfd0cca300c5dc49213cf1c78c77393600410d (patch) | |
tree | 5a4a5ecb5ab0215113eacf763a9d15500a02b0ee /drivers/watchdog/ib700wdt.c | |
parent | 2ba7d7b39f3adf3f71aa3acab00111a429056c7d (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/ib700wdt.c')
-rw-r--r-- | drivers/watchdog/ib700wdt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c index c3a60f52ccb9..4b89f401691a 100644 --- a/drivers/watchdog/ib700wdt.c +++ b/drivers/watchdog/ib700wdt.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | static struct platform_device *ibwdt_platform_device; | 49 | static struct platform_device *ibwdt_platform_device; |
50 | static unsigned long ibwdt_is_open; | 50 | static unsigned long ibwdt_is_open; |
51 | static spinlock_t ibwdt_lock; | 51 | static DEFINE_SPINLOCK(ibwdt_lock); |
52 | static char expect_close; | 52 | static char expect_close; |
53 | 53 | ||
54 | /* Module information */ | 54 | /* Module information */ |
@@ -308,8 +308,6 @@ static int __devinit ibwdt_probe(struct platform_device *dev) | |||
308 | { | 308 | { |
309 | int res; | 309 | int res; |
310 | 310 | ||
311 | spin_lock_init(&ibwdt_lock); | ||
312 | |||
313 | #if WDT_START != WDT_STOP | 311 | #if WDT_START != WDT_STOP |
314 | if (!request_region(WDT_STOP, 1, "IB700 WDT")) { | 312 | if (!request_region(WDT_STOP, 1, "IB700 WDT")) { |
315 | printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP); | 313 | printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP); |