From c7dfd0cca300c5dc49213cf1c78c77393600410d Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Thu, 1 Nov 2007 16:27:08 -0700 Subject: [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 Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- drivers/watchdog/davinci_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/watchdog/davinci_wdt.c') diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index e49a36c0d4d..a61cbd48dc0 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -61,7 +61,7 @@ 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 @@ -200,8 +200,6 @@ static int davinci_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; -- cgit v1.2.3