git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[WATCHDOG] timers cleanup
[pandora-kernel.git]
/
drivers
/
char
/
watchdog
/
sbc60xxwdt.c
diff --git
a/drivers/char/watchdog/sbc60xxwdt.c
b/drivers/char/watchdog/sbc60xxwdt.c
index
f5fb8cc
..
b628203
100644
(file)
--- a/
drivers/char/watchdog/sbc60xxwdt.c
+++ b/
drivers/char/watchdog/sbc60xxwdt.c
@@
-103,7
+103,7
@@
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static void wdt_timer_ping(unsigned long);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static void wdt_timer_ping(unsigned long);
-static
struct timer_list timer
;
+static
DEFINE_TIMER(timer, wdt_timer_ping, 0, 0)
;
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
@@
-122,8
+122,7
@@
static void wdt_timer_ping(unsigned long data)
/* Ping the WDT by reading from wdt_start */
inb_p(wdt_start);
/* Re-set the timer interval */
/* Ping the WDT by reading from wdt_start */
inb_p(wdt_start);
/* Re-set the timer interval */
- timer.expires = jiffies + WDT_INTERVAL;
- add_timer(&timer);
+ mod_timer(&timer, jiffies + WDT_INTERVAL);
} else {
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
}
} else {
printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
}
@@
-138,8
+137,7
@@
static void wdt_startup(void)
next_heartbeat = jiffies + (timeout * HZ);
/* Start the timer */
next_heartbeat = jiffies + (timeout * HZ);
/* Start the timer */
- timer.expires = jiffies + WDT_INTERVAL;
- add_timer(&timer);
+ mod_timer(&timer, jiffies + WDT_INTERVAL);
printk(KERN_INFO PFX "Watchdog timer is now enabled.\n");
}
printk(KERN_INFO PFX "Watchdog timer is now enabled.\n");
}
@@
-363,10
+361,6
@@
static int __init sbc60xxwdt_init(void)
}
}
}
}
- init_timer(&timer);
- timer.function = wdt_timer_ping;
- timer.data = 0;
-
rc = misc_register(&wdt_miscdev);
if (rc)
{
rc = misc_register(&wdt_miscdev);
if (rc)
{