aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sbc_fitpc2_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/sbc_fitpc2_wdt.c')
-rw-r--r--drivers/watchdog/sbc_fitpc2_wdt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index 07d59b33c48b..90d5527ca886 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -26,7 +26,7 @@
26#include <linux/uaccess.h> 26#include <linux/uaccess.h>
27 27
28 28
29static int nowayout = WATCHDOG_NOWAYOUT; 29static bool nowayout = WATCHDOG_NOWAYOUT;
30static unsigned int margin = 60; /* (secs) Default is 1 minute */ 30static unsigned int margin = 60; /* (secs) Default is 1 minute */
31static unsigned long wdt_status; 31static unsigned long wdt_status;
32static DEFINE_MUTEX(wdt_lock); 32static DEFINE_MUTEX(wdt_lock);
@@ -170,8 +170,7 @@ static int fitpc2_wdt_release(struct inode *inode, struct file *file)
170 wdt_disable(); 170 wdt_disable();
171 pr_info("Device disabled\n"); 171 pr_info("Device disabled\n");
172 } else { 172 } else {
173 pr_warning("Device closed unexpectedly -" 173 pr_warn("Device closed unexpectedly - timer will not stop\n");
174 " timer will not stop\n");
175 wdt_enable(); 174 wdt_enable();
176 } 175 }
177 176
@@ -221,8 +220,8 @@ static int __init fitpc2_wdt_init(void)
221 } 220 }
222 221
223 if (margin < 31 || margin > 255) { 222 if (margin < 31 || margin > 255) {
224 pr_err("margin must be in range 31 - 255" 223 pr_err("margin must be in range 31 - 255 seconds, you tried to set %d\n",
225 " seconds, you tried to set %d\n", margin); 224 margin);
226 err = -EINVAL; 225 err = -EINVAL;
227 goto err_margin; 226 goto err_margin;
228 } 227 }
@@ -230,7 +229,7 @@ static int __init fitpc2_wdt_init(void)
230 err = misc_register(&fitpc2_wdt_miscdev); 229 err = misc_register(&fitpc2_wdt_miscdev);
231 if (err) { 230 if (err) {
232 pr_err("cannot register miscdev on minor=%d (err=%d)\n", 231 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
233 WATCHDOG_MINOR, err); 232 WATCHDOG_MINOR, err);
234 goto err_margin; 233 goto err_margin;
235 } 234 }
236 235
@@ -260,7 +259,7 @@ MODULE_DESCRIPTION("SBC-FITPC2 Watchdog");
260module_param(margin, int, 0); 259module_param(margin, int, 0);
261MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)"); 260MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)");
262 261
263module_param(nowayout, int, 0); 262module_param(nowayout, bool, 0);
264MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); 263MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
265 264
266MODULE_LICENSE("GPL"); 265MODULE_LICENSE("GPL");