diff options
Diffstat (limited to 'drivers/watchdog/at91sam9_wdt.c')
-rw-r--r-- | drivers/watchdog/at91sam9_wdt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 8038b20284ce..be37dde4f864 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c | |||
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | /* User land timeout */ | 57 | /* User land timeout */ |
58 | #define WDT_HEARTBEAT 15 | 58 | #define WDT_HEARTBEAT 15 |
59 | static int heartbeat = WDT_HEARTBEAT; | 59 | static int heartbeat; |
60 | module_param(heartbeat, int, 0); | 60 | module_param(heartbeat, int, 0); |
61 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. " | 61 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. " |
62 | "(default = " __MODULE_STRING(WDT_HEARTBEAT) ")"); | 62 | "(default = " __MODULE_STRING(WDT_HEARTBEAT) ")"); |
@@ -176,6 +176,7 @@ static const struct watchdog_ops at91_wdt_ops = { | |||
176 | static struct watchdog_device at91_wdt_dev = { | 176 | static struct watchdog_device at91_wdt_dev = { |
177 | .info = &at91_wdt_info, | 177 | .info = &at91_wdt_info, |
178 | .ops = &at91_wdt_ops, | 178 | .ops = &at91_wdt_ops, |
179 | .timeout = WDT_HEARTBEAT, | ||
179 | .min_timeout = 1, | 180 | .min_timeout = 1, |
180 | .max_timeout = 0xFFFF, | 181 | .max_timeout = 0xFFFF, |
181 | }; | 182 | }; |
@@ -194,8 +195,8 @@ static int __init at91wdt_probe(struct platform_device *pdev) | |||
194 | return -ENOMEM; | 195 | return -ENOMEM; |
195 | } | 196 | } |
196 | 197 | ||
197 | at91_wdt_dev.timeout = heartbeat; | ||
198 | at91_wdt_dev.parent = &pdev->dev; | 198 | at91_wdt_dev.parent = &pdev->dev; |
199 | watchdog_init_timeout(&at91_wdt_dev, heartbeat, &pdev->dev); | ||
199 | watchdog_set_nowayout(&at91_wdt_dev, nowayout); | 200 | watchdog_set_nowayout(&at91_wdt_dev, nowayout); |
200 | 201 | ||
201 | /* Set watchdog */ | 202 | /* Set watchdog */ |
@@ -212,7 +213,7 @@ static int __init at91wdt_probe(struct platform_device *pdev) | |||
212 | mod_timer(&at91wdt_private.timer, jiffies + WDT_TIMEOUT); | 213 | mod_timer(&at91wdt_private.timer, jiffies + WDT_TIMEOUT); |
213 | 214 | ||
214 | pr_info("enabled (heartbeat=%d sec, nowayout=%d)\n", | 215 | pr_info("enabled (heartbeat=%d sec, nowayout=%d)\n", |
215 | heartbeat, nowayout); | 216 | at91_wdt_dev.timeout, nowayout); |
216 | 217 | ||
217 | return 0; | 218 | return 0; |
218 | } | 219 | } |