diff options
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 b2922178359..502773ad5ac 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); |