[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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
2ba7d7b39f
commit
c7dfd0cca3
@@ -54,7 +54,7 @@
|
||||
#include <asm/system.h>
|
||||
|
||||
static unsigned long sbc8360_is_open;
|
||||
static spinlock_t sbc8360_lock;
|
||||
static DEFINE_SPINLOCK(sbc8360_lock);
|
||||
static char expect_close;
|
||||
|
||||
#define PFX "sbc8360: "
|
||||
@@ -359,7 +359,6 @@ static int __init sbc8360_init(void)
|
||||
goto out_noreboot;
|
||||
}
|
||||
|
||||
spin_lock_init(&sbc8360_lock);
|
||||
res = misc_register(&sbc8360_miscdev);
|
||||
if (res) {
|
||||
printk(KERN_ERR PFX "failed to register misc device\n");
|
||||
|
Reference in New Issue
Block a user