aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/cpu5wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/cpu5wdt.c')
-rw-r--r--drivers/watchdog/cpu5wdt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c
index 251c863d71dd..7e888393de1f 100644
--- a/drivers/watchdog/cpu5wdt.c
+++ b/drivers/watchdog/cpu5wdt.c
@@ -19,6 +19,8 @@
19 * 19 *
20 */ 20 */
21 21
22#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23
22#include <linux/module.h> 24#include <linux/module.h>
23#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
24#include <linux/types.h> 26#include <linux/types.h>
@@ -71,7 +73,7 @@ static struct {
71static void cpu5wdt_trigger(unsigned long unused) 73static void cpu5wdt_trigger(unsigned long unused)
72{ 74{
73 if (verbose > 2) 75 if (verbose > 2)
74 printk(KERN_DEBUG PFX "trigger at %i ticks\n", ticks); 76 pr_debug("trigger at %i ticks\n", ticks);
75 77
76 if (cpu5wdt_device.running) 78 if (cpu5wdt_device.running)
77 ticks--; 79 ticks--;
@@ -96,7 +98,7 @@ static void cpu5wdt_reset(void)
96 ticks = cpu5wdt_device.default_ticks; 98 ticks = cpu5wdt_device.default_ticks;
97 99
98 if (verbose) 100 if (verbose)
99 printk(KERN_DEBUG PFX "reset (%i ticks)\n", (int) ticks); 101 pr_debug("reset (%i ticks)\n", (int) ticks);
100 102
101} 103}
102 104
@@ -129,7 +131,7 @@ static int cpu5wdt_stop(void)
129 ticks = cpu5wdt_device.default_ticks; 131 ticks = cpu5wdt_device.default_ticks;
130 spin_unlock_irqrestore(&cpu5wdt_lock, flags); 132 spin_unlock_irqrestore(&cpu5wdt_lock, flags);
131 if (verbose) 133 if (verbose)
132 printk(KERN_CRIT PFX "stop not possible\n"); 134 pr_crit("stop not possible\n");
133 return -EIO; 135 return -EIO;
134} 136}
135 137
@@ -219,8 +221,7 @@ static int __devinit cpu5wdt_init(void)
219 int err; 221 int err;
220 222
221 if (verbose) 223 if (verbose)
222 printk(KERN_DEBUG PFX 224 pr_debug("port=0x%x, verbose=%i\n", port, verbose);
223 "port=0x%x, verbose=%i\n", port, verbose);
224 225
225 init_completion(&cpu5wdt_device.stop); 226 init_completion(&cpu5wdt_device.stop);
226 cpu5wdt_device.queue = 0; 227 cpu5wdt_device.queue = 0;
@@ -228,7 +229,7 @@ static int __devinit cpu5wdt_init(void)
228 cpu5wdt_device.default_ticks = ticks; 229 cpu5wdt_device.default_ticks = ticks;
229 230
230 if (!request_region(port, CPU5WDT_EXTENT, PFX)) { 231 if (!request_region(port, CPU5WDT_EXTENT, PFX)) {
231 printk(KERN_ERR PFX "request_region failed\n"); 232 pr_err("request_region failed\n");
232 err = -EBUSY; 233 err = -EBUSY;
233 goto no_port; 234 goto no_port;
234 } 235 }
@@ -237,16 +238,16 @@ static int __devinit cpu5wdt_init(void)
237 val = inb(port + CPU5WDT_STATUS_REG); 238 val = inb(port + CPU5WDT_STATUS_REG);
238 val = (val >> 2) & 1; 239 val = (val >> 2) & 1;
239 if (!val) 240 if (!val)
240 printk(KERN_INFO PFX "sorry, was my fault\n"); 241 pr_info("sorry, was my fault\n");
241 242
242 err = misc_register(&cpu5wdt_misc); 243 err = misc_register(&cpu5wdt_misc);
243 if (err < 0) { 244 if (err < 0) {
244 printk(KERN_ERR PFX "misc_register failed\n"); 245 pr_err("misc_register failed\n");
245 goto no_misc; 246 goto no_misc;
246 } 247 }
247 248
248 249
249 printk(KERN_INFO PFX "init success\n"); 250 pr_info("init success\n");
250 return 0; 251 return 0;
251 252
252no_misc: 253no_misc: