diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-29 00:54:01 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-01-06 09:17:17 -0500 |
commit | 1334f32938e46fb321c67a652997d33583257249 (patch) | |
tree | f296005ef79641ea4733af19cda0f5bf736824b1 /drivers/watchdog/iop_wdt.c | |
parent | 216f3ad9aa5731024b9c96e63b676f9f65078dd5 (diff) |
watchdog: Use DEFINE_SPINLOCK() for static spinlocks
Rather than just defining static spinlock_t variables and then
initializing them later in init functions, simply define them with
DEFINE_SPINLOCK() and remove the calls to spin_lock_init().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Nicolas Thill <nico@openwrt.org>
Cc: Heiko Ronsdorf <hero@ihg.uni-duisburg.de>
Cc: Rodolfo Giometti <giometti@ascensit.com>
Cc: Andrey Panin <pazke@donpac.ru>
Cc: Guido Guenther <agx@sigxcpu.org>
Cc: Curt E Bruns <curt.e.bruns@intel.com>
Cc: Deepak Saxena <dsaxena@plexity.net>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: George G. Davis <gdavis@mvista.com>
Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/iop_wdt.c')
-rw-r--r-- | drivers/watchdog/iop_wdt.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c index aef94789019f..82fa7a92a8d2 100644 --- a/drivers/watchdog/iop_wdt.c +++ b/drivers/watchdog/iop_wdt.c | |||
@@ -37,7 +37,7 @@ | |||
37 | static int nowayout = WATCHDOG_NOWAYOUT; | 37 | static int nowayout = WATCHDOG_NOWAYOUT; |
38 | static unsigned long wdt_status; | 38 | static unsigned long wdt_status; |
39 | static unsigned long boot_status; | 39 | static unsigned long boot_status; |
40 | static spinlock_t wdt_lock; | 40 | static DEFINE_SPINLOCK(wdt_lock); |
41 | 41 | ||
42 | #define WDT_IN_USE 0 | 42 | #define WDT_IN_USE 0 |
43 | #define WDT_OK_TO_CLOSE 1 | 43 | #define WDT_OK_TO_CLOSE 1 |
@@ -226,9 +226,6 @@ static int __init iop_wdt_init(void) | |||
226 | { | 226 | { |
227 | int ret; | 227 | int ret; |
228 | 228 | ||
229 | spin_lock_init(&wdt_lock); | ||
230 | |||
231 | |||
232 | /* check if the reset was caused by the watchdog timer */ | 229 | /* check if the reset was caused by the watchdog timer */ |
233 | boot_status = (read_rcsr() & IOP_RCSR_WDT) ? WDIOF_CARDRESET : 0; | 230 | boot_status = (read_rcsr() & IOP_RCSR_WDT) ? WDIOF_CARDRESET : 0; |
234 | 231 | ||