aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/mixcomwd.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:06:19 -0500
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 13:59:26 -0400
commit27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch)
tree06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/mixcomwd.c
parent7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff)
watchdog: Use pr_<fmt> and pr_<level>
Use the current logging styles. Make sure all output has a prefix. Add missing newlines. Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/mixcomwd.c')
-rw-r--r--drivers/watchdog/mixcomwd.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c
index bc820d16699a..17ec5b9dddd2 100644
--- a/drivers/watchdog/mixcomwd.c
+++ b/drivers/watchdog/mixcomwd.c
@@ -39,9 +39,10 @@
39 * 39 *
40 */ 40 */
41 41
42#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
43
42#define VERSION "0.6" 44#define VERSION "0.6"
43#define WATCHDOG_NAME "mixcomwd" 45#define WATCHDOG_NAME "mixcomwd"
44#define PFX WATCHDOG_NAME ": "
45 46
46#include <linux/module.h> 47#include <linux/module.h>
47#include <linux/moduleparam.h> 48#include <linux/moduleparam.h>
@@ -156,15 +157,13 @@ static int mixcomwd_release(struct inode *inode, struct file *file)
156{ 157{
157 if (expect_close == 42) { 158 if (expect_close == 42) {
158 if (mixcomwd_timer_alive) { 159 if (mixcomwd_timer_alive) {
159 printk(KERN_ERR PFX 160 pr_err("release called while internal timer alive\n");
160 "release called while internal timer alive");
161 return -EBUSY; 161 return -EBUSY;
162 } 162 }
163 mixcomwd_timer_alive = 1; 163 mixcomwd_timer_alive = 1;
164 mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); 164 mod_timer(&mixcomwd_timer, jiffies + 5 * HZ);
165 } else 165 } else
166 printk(KERN_CRIT PFX 166 pr_crit("WDT device closed unexpectedly. WDT will not stop!\n");
167 "WDT device closed unexpectedly. WDT will not stop!\n");
168 167
169 clear_bit(0, &mixcomwd_opened); 168 clear_bit(0, &mixcomwd_opened);
170 expect_close = 0; 169 expect_close = 0;
@@ -274,22 +273,19 @@ static int __init mixcomwd_init(void)
274 } 273 }
275 274
276 if (!found) { 275 if (!found) {
277 printk(KERN_ERR PFX 276 pr_err("No card detected, or port not available\n");
278 "No card detected, or port not available.\n");
279 return -ENODEV; 277 return -ENODEV;
280 } 278 }
281 279
282 ret = misc_register(&mixcomwd_miscdev); 280 ret = misc_register(&mixcomwd_miscdev);
283 if (ret) { 281 if (ret) {
284 printk(KERN_ERR PFX 282 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
285 "cannot register miscdev on minor=%d (err=%d)\n", 283 WATCHDOG_MINOR, ret);
286 WATCHDOG_MINOR, ret);
287 goto error_misc_register_watchdog; 284 goto error_misc_register_watchdog;
288 } 285 }
289 286
290 printk(KERN_INFO 287 pr_info("MixCOM watchdog driver v%s, watchdog port at 0x%3x\n",
291 "MixCOM watchdog driver v%s, watchdog port at 0x%3x\n", 288 VERSION, watchdog_port);
292 VERSION, watchdog_port);
293 289
294 return 0; 290 return 0;
295 291
@@ -303,8 +299,7 @@ static void __exit mixcomwd_exit(void)
303{ 299{
304 if (!nowayout) { 300 if (!nowayout) {
305 if (mixcomwd_timer_alive) { 301 if (mixcomwd_timer_alive) {
306 printk(KERN_WARNING PFX "I quit now, hardware will" 302 pr_warn("I quit now, hardware will probably reboot!\n");
307 " probably reboot!\n");
308 del_timer_sync(&mixcomwd_timer); 303 del_timer_sync(&mixcomwd_timer);
309 mixcomwd_timer_alive = 0; 304 mixcomwd_timer_alive = 0;
310 } 305 }