diff options
author | Joe Perches <joe@perches.com> | 2012-02-15 15:06:19 -0800 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 19:59:26 +0200 |
commit | 27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch) | |
tree | 06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/w83627hf_wdt.c | |
parent | 7cbc353540c31ffaf65ad44d89b955be0f1d04dc (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/w83627hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 576a388a116..96935873284 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c @@ -26,6 +26,8 @@ * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> @@ -43,7 +45,6 @@ #include <asm/system.h> #define WATCHDOG_NAME "w83627hf/thf/hg/dhg WDT" -#define PFX WATCHDOG_NAME ": " #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ static unsigned long wdt_is_open; @@ -119,9 +120,8 @@ static void w83627hf_init(void) outb_p(0xF6, WDT_EFER); /* Select CRF6 */ t = inb_p(WDT_EFDR); /* read CRF6 */ if (t != 0) { - printk(KERN_INFO PFX - "Watchdog already running. Resetting timeout to %d sec\n", - timeout); + pr_info("Watchdog already running. Resetting timeout to %d sec\n", + timeout); outb_p(timeout, WDT_EFDR); /* Write back to CRF6 */ } @@ -290,8 +290,7 @@ static int wdt_close(struct inode *inode, struct file *file) if (expect_close == 42) wdt_disable(); else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); wdt_ping(); } expect_close = 0; @@ -344,18 +343,16 @@ static int __init wdt_init(void) { int ret; - printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG/DHG Super I/O chip initialising.\n"); + pr_info("WDT driver for the Winbond(TM) W83627HF/THF/HG/DHG Super I/O chip initialising\n"); if (wdt_set_heartbeat(timeout)) { wdt_set_heartbeat(WATCHDOG_TIMEOUT); - printk(KERN_INFO PFX - "timeout value must be 1 <= timeout <= 255, using %d\n", - WATCHDOG_TIMEOUT); + pr_info("timeout value must be 1 <= timeout <= 255, using %d\n", + WATCHDOG_TIMEOUT); } if (!request_region(wdt_io, 1, WATCHDOG_NAME)) { - printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", - wdt_io); + pr_err("I/O address 0x%04x already in use\n", wdt_io); ret = -EIO; goto out; } @@ -364,22 +361,19 @@ static int __init wdt_init(void) ret = register_reboot_notifier(&wdt_notifier); if (ret != 0) { - printk(KERN_ERR PFX - "cannot register reboot notifier (err=%d)\n", ret); + pr_err("cannot register reboot notifier (err=%d)\n", ret); goto unreg_regions; } ret = misc_register(&wdt_miscdev); if (ret != 0) { - printk(KERN_ERR PFX - "cannot register miscdev on minor=%d (err=%d)\n", - WATCHDOG_MINOR, ret); + pr_err("cannot register miscdev on minor=%d (err=%d)\n", + WATCHDOG_MINOR, ret); goto unreg_reboot; } - printk(KERN_INFO PFX - "initialized. timeout=%d sec (nowayout=%d)\n", - timeout, nowayout); + pr_info("initialized. timeout=%d sec (nowayout=%d)\n", + timeout, nowayout); out: return ret; |