From 1334f32938e46fb321c67a652997d33583257249 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 29 Nov 2011 13:54:01 +0800 Subject: 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 Cc: Nicolas Thill Cc: Heiko Ronsdorf Cc: Rodolfo Giometti Cc: Andrey Panin Cc: Guido Guenther Cc: Curt E Bruns Cc: Deepak Saxena Cc: Andrew Victor Cc: George G. Davis Cc: Sylver Bruneau Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/ar7_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/watchdog/ar7_wdt.c') diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index b29221783598..b9564c5ddab9 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c @@ -70,8 +70,8 @@ struct ar7_wdt { }; static unsigned long wdt_is_open; -static spinlock_t wdt_lock; static unsigned expect_close; +static DEFINE_SPINLOCK(wdt_lock); /* XXX currently fixed, allows max margin ~68.72 secs */ #define prescale_value 0xffff @@ -280,8 +280,6 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) { int rc; - spin_lock_init(&wdt_lock); - ar7_regs_wdt = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); if (!ar7_regs_wdt) { -- cgit v1.2.3