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/davinci_wdt.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/davinci_wdt.c')
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index e49a36c0d4d6..a61cbd48dc07 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c | |||
@@ -61,7 +61,7 @@ | |||
61 | 61 | ||
62 | static int heartbeat = DEFAULT_HEARTBEAT; | 62 | static int heartbeat = DEFAULT_HEARTBEAT; |
63 | 63 | ||
64 | static spinlock_t io_lock; | 64 | static DEFINE_SPINLOCK(io_lock); |
65 | static unsigned long wdt_status; | 65 | static unsigned long wdt_status; |
66 | #define WDT_IN_USE 0 | 66 | #define WDT_IN_USE 0 |
67 | #define WDT_OK_TO_CLOSE 1 | 67 | #define WDT_OK_TO_CLOSE 1 |
@@ -200,8 +200,6 @@ static int davinci_wdt_probe(struct platform_device *pdev) | |||
200 | int ret = 0, size; | 200 | int ret = 0, size; |
201 | struct resource *res; | 201 | struct resource *res; |
202 | 202 | ||
203 | spin_lock_init(&io_lock); | ||
204 | |||
205 | if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) | 203 | if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) |
206 | heartbeat = DEFAULT_HEARTBEAT; | 204 | heartbeat = DEFAULT_HEARTBEAT; |
207 | 205 | ||