diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-11-02 00:27:08 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-11-02 20:09:07 +0100 |
commit | c7dfd0cca300c5dc49213cf1c78c77393600410d (patch) | |
tree | 5a4a5ecb5ab0215113eacf763a9d15500a02b0ee /drivers/watchdog/pnx4008_wdt.c | |
parent | [WATCHDOG] Unlock in iTCO_wdt_start when reboot is disabled (diff) | |
download | linux-c7dfd0cca300c5dc49213cf1c78c77393600410d.tar.xz linux-c7dfd0cca300c5dc49213cf1c78c77393600410d.zip |
[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/pnx4008_wdt.c')
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index b0eb9f9b43c7..b04aa096a10a 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -80,7 +80,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; static int heartbeat = DEFAULT_HEARTBEAT; -static spinlock_t io_lock; +static DEFINE_SPINLOCK(io_lock); static unsigned long wdt_status; #define WDT_IN_USE 0 #define WDT_OK_TO_CLOSE 1 @@ -254,8 +254,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) int ret = 0, size; struct resource *res; - spin_lock_init(&io_lock); - if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) heartbeat = DEFAULT_HEARTBEAT; |