You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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
@@ -50,7 +50,7 @@ static int timeoutW; /* timeout in watchdog counter units */
|
||||
static unsigned long timer_alive;
|
||||
static int testmode;
|
||||
static char expect_close;
|
||||
static spinlock_t spinlock;
|
||||
static DEFINE_SPINLOCK(spinlock);
|
||||
|
||||
module_param(timeout, int, 0);
|
||||
MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
|
||||
@@ -476,8 +476,6 @@ static int __init w83977f_wdt_init(void)
|
||||
|
||||
printk(KERN_INFO PFX DRIVER_VERSION);
|
||||
|
||||
spin_lock_init(&spinlock);
|
||||
|
||||
/*
|
||||
* Check that the timeout value is within it's range ;
|
||||
* if not reset to the default
|
||||
|
||||
Reference in New Issue
Block a user