diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 10:29:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 10:29:23 -0800 |
commit | 88266917b518e2ca954d85983470592aaaf82993 (patch) | |
tree | e8c6e77cf6c70de0dbe655ce3cd4401391a06b6e /drivers/watchdog/ar7_wdt.c | |
parent | 269d430131b699c2cadf58495f025a4092959ef5 (diff) | |
parent | e2bf7c4c22939bd83814d8da40a352d246030b1b (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: omap_wdt.c: fix the WDIOC_GETBOOTSTATUS ioctl if not implemented.
watchdog: new driver for VIA chipsets
watchdog: ath79_wdt: flush register writes
drivers/watchdog/lantiq_wdt.c: drop iounmap for devm_ allocated data
watchdog: documentation: describe nowayout in coversion-guide
watchdog: documentation: update index file
watchdog: Convert wm831x driver to devm_kzalloc()
watchdog: add nowayout helpers to Watchdog Timer Driver Kernel API
watchdog: convert drivers/watchdog/* to use module_platform_driver()
watchdog: Use DEFINE_SPINLOCK() for static spinlocks
watchdog: Convert Wolfson drivers to module_platform_driver
Diffstat (limited to 'drivers/watchdog/ar7_wdt.c')
-rw-r--r-- | drivers/watchdog/ar7_wdt.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index b29221783598..502773ad5acd 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) { @@ -355,15 +353,4 @@ static struct platform_driver ar7_wdt_driver = { }, }; -static int __init ar7_wdt_init(void) -{ - return platform_driver_register(&ar7_wdt_driver); -} - -static void __exit ar7_wdt_cleanup(void) -{ - platform_driver_unregister(&ar7_wdt_driver); -} - -module_init(ar7_wdt_init); -module_exit(ar7_wdt_cleanup); +module_platform_driver(ar7_wdt_driver); |