diff options
Diffstat (limited to 'drivers/watchdog/iop_wdt.c')
-rw-r--r-- | drivers/watchdog/iop_wdt.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c index 82fa7a92a8d2..d964faf1a250 100644 --- a/drivers/watchdog/iop_wdt.c +++ b/drivers/watchdog/iop_wdt.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * Dan Williams <dan.j.williams@intel.com> | 24 | * Dan Williams <dan.j.williams@intel.com> |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #include <linux/module.h> | 29 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
29 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
@@ -34,7 +36,7 @@ | |||
34 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
35 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
36 | 38 | ||
37 | static int nowayout = WATCHDOG_NOWAYOUT; | 39 | static bool nowayout = WATCHDOG_NOWAYOUT; |
38 | static unsigned long wdt_status; | 40 | static unsigned long wdt_status; |
39 | static unsigned long boot_status; | 41 | static unsigned long boot_status; |
40 | static DEFINE_SPINLOCK(wdt_lock); | 42 | static DEFINE_SPINLOCK(wdt_lock); |
@@ -85,7 +87,7 @@ static int wdt_disable(void) | |||
85 | write_wdtcr(IOP_WDTCR_DIS); | 87 | write_wdtcr(IOP_WDTCR_DIS); |
86 | clear_bit(WDT_ENABLED, &wdt_status); | 88 | clear_bit(WDT_ENABLED, &wdt_status); |
87 | spin_unlock(&wdt_lock); | 89 | spin_unlock(&wdt_lock); |
88 | printk(KERN_INFO "WATCHDOG: Disabled\n"); | 90 | pr_info("Disabled\n"); |
89 | return 0; | 91 | return 0; |
90 | } else | 92 | } else |
91 | return 1; | 93 | return 1; |
@@ -197,8 +199,8 @@ static int iop_wdt_release(struct inode *inode, struct file *file) | |||
197 | */ | 199 | */ |
198 | if (state != 0) { | 200 | if (state != 0) { |
199 | wdt_enable(); | 201 | wdt_enable(); |
200 | printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - " | 202 | pr_crit("Device closed unexpectedly - reset in %lu seconds\n", |
201 | "reset in %lu seconds\n", iop_watchdog_timeout()); | 203 | iop_watchdog_timeout()); |
202 | } | 204 | } |
203 | 205 | ||
204 | clear_bit(WDT_IN_USE, &wdt_status); | 206 | clear_bit(WDT_IN_USE, &wdt_status); |
@@ -238,8 +240,7 @@ static int __init iop_wdt_init(void) | |||
238 | with an open */ | 240 | with an open */ |
239 | ret = misc_register(&iop_wdt_miscdev); | 241 | ret = misc_register(&iop_wdt_miscdev); |
240 | if (ret == 0) | 242 | if (ret == 0) |
241 | printk(KERN_INFO "iop watchdog timer: timeout %lu sec\n", | 243 | pr_info("timeout %lu sec\n", iop_watchdog_timeout()); |
242 | iop_watchdog_timeout()); | ||
243 | 244 | ||
244 | return ret; | 245 | return ret; |
245 | } | 246 | } |
@@ -252,7 +253,7 @@ static void __exit iop_wdt_exit(void) | |||
252 | module_init(iop_wdt_init); | 253 | module_init(iop_wdt_init); |
253 | module_exit(iop_wdt_exit); | 254 | module_exit(iop_wdt_exit); |
254 | 255 | ||
255 | module_param(nowayout, int, 0); | 256 | module_param(nowayout, bool, 0); |
256 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); | 257 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); |
257 | 258 | ||
258 | MODULE_AUTHOR("Curt E Bruns <curt.e.bruns@intel.com>"); | 259 | MODULE_AUTHOR("Curt E Bruns <curt.e.bruns@intel.com>"); |