aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/mv64x60_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/mv64x60_wdt.c')
-rw-r--r--drivers/watchdog/mv64x60_wdt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index 97f8a48d8b78..c53d025e70df 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -15,6 +15,8 @@
15 * or implied. 15 * or implied.
16 */ 16 */
17 17
18#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
19
18#include <linux/fs.h> 20#include <linux/fs.h>
19#include <linux/init.h> 21#include <linux/init.h>
20#include <linux/kernel.h> 22#include <linux/kernel.h>
@@ -58,8 +60,8 @@ static unsigned int bus_clk;
58static char expect_close; 60static char expect_close;
59static DEFINE_SPINLOCK(mv64x60_wdt_spinlock); 61static DEFINE_SPINLOCK(mv64x60_wdt_spinlock);
60 62
61static int nowayout = WATCHDOG_NOWAYOUT; 63static bool nowayout = WATCHDOG_NOWAYOUT;
62module_param(nowayout, int, 0); 64module_param(nowayout, bool, 0);
63MODULE_PARM_DESC(nowayout, 65MODULE_PARM_DESC(nowayout,
64 "Watchdog cannot be stopped once started (default=" 66 "Watchdog cannot be stopped once started (default="
65 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 67 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
@@ -100,7 +102,7 @@ static void mv64x60_wdt_handler_enable(void)
100 if (mv64x60_wdt_toggle_wdc(MV64x60_WDC_ENABLED_FALSE, 102 if (mv64x60_wdt_toggle_wdc(MV64x60_WDC_ENABLED_FALSE,
101 MV64x60_WDC_ENABLE_SHIFT)) { 103 MV64x60_WDC_ENABLE_SHIFT)) {
102 mv64x60_wdt_service(); 104 mv64x60_wdt_service();
103 printk(KERN_NOTICE "mv64x60_wdt: watchdog activated\n"); 105 pr_notice("watchdog activated\n");
104 } 106 }
105} 107}
106 108
@@ -108,7 +110,7 @@ static void mv64x60_wdt_handler_disable(void)
108{ 110{
109 if (mv64x60_wdt_toggle_wdc(MV64x60_WDC_ENABLED_TRUE, 111 if (mv64x60_wdt_toggle_wdc(MV64x60_WDC_ENABLED_TRUE,
110 MV64x60_WDC_ENABLE_SHIFT)) 112 MV64x60_WDC_ENABLE_SHIFT))
111 printk(KERN_NOTICE "mv64x60_wdt: watchdog deactivated\n"); 113 pr_notice("watchdog deactivated\n");
112} 114}
113 115
114static void mv64x60_wdt_set_timeout(unsigned int timeout) 116static void mv64x60_wdt_set_timeout(unsigned int timeout)
@@ -139,8 +141,7 @@ static int mv64x60_wdt_release(struct inode *inode, struct file *file)
139 if (expect_close == 42) 141 if (expect_close == 42)
140 mv64x60_wdt_handler_disable(); 142 mv64x60_wdt_handler_disable();
141 else { 143 else {
142 printk(KERN_CRIT 144 pr_crit("unexpected close, not stopping timer!\n");
143 "mv64x60_wdt: unexpected close, not stopping timer!\n");
144 mv64x60_wdt_service(); 145 mv64x60_wdt_service();
145 } 146 }
146 expect_close = 0; 147 expect_close = 0;
@@ -308,7 +309,7 @@ static struct platform_driver mv64x60_wdt_driver = {
308 309
309static int __init mv64x60_wdt_init(void) 310static int __init mv64x60_wdt_init(void)
310{ 311{
311 printk(KERN_INFO "MV64x60 watchdog driver\n"); 312 pr_info("MV64x60 watchdog driver\n");
312 313
313 return platform_driver_register(&mv64x60_wdt_driver); 314 return platform_driver_register(&mv64x60_wdt_driver);
314} 315}