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/i6300esb.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/i6300esb.c')
-rw-r--r-- | drivers/watchdog/i6300esb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index f236954d2536..ca44fd9b19bb 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c | |||
@@ -77,7 +77,7 @@ | |||
77 | 77 | ||
78 | /* internal variables */ | 78 | /* internal variables */ |
79 | static void __iomem *BASEADDR; | 79 | static void __iomem *BASEADDR; |
80 | static spinlock_t esb_lock; /* Guards the hardware */ | 80 | static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */ |
81 | static unsigned long timer_alive; | 81 | static unsigned long timer_alive; |
82 | static struct pci_dev *esb_pci; | 82 | static struct pci_dev *esb_pci; |
83 | static unsigned short triggered; /* The status of the watchdog upon boot */ | 83 | static unsigned short triggered; /* The status of the watchdog upon boot */ |
@@ -456,8 +456,6 @@ static int __init watchdog_init (void) | |||
456 | { | 456 | { |
457 | int ret; | 457 | int ret; |
458 | 458 | ||
459 | spin_lock_init(&esb_lock); | ||
460 | |||
461 | /* Check whether or not the hardware watchdog is there */ | 459 | /* Check whether or not the hardware watchdog is there */ |
462 | if (!esb_getdevice () || esb_pci == NULL) | 460 | if (!esb_getdevice () || esb_pci == NULL) |
463 | return -ENODEV; | 461 | return -ENODEV; |