diff options
author | Joe Perches <joe@perches.com> | 2012-02-16 03:06:19 +0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 21:59:26 +0400 |
commit | 27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch) | |
tree | 06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/ibmasr.c | |
parent | 7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff) | |
download | linux-27c766aaacb265d625dc634bf7903f7f9fd0c697.tar.xz |
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/ibmasr.c')
-rw-r--r-- | drivers/watchdog/ibmasr.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index c7481ad51629..6cd496915eb0 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c @@ -10,6 +10,8 @@ * of the GNU Public License, incorporated herein by reference. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/fs.h> #include <linux/kernel.h> #include <linux/module.h> @@ -31,8 +33,6 @@ enum { ASMTYPE_SPRUCE, }; -#define PFX "ibmasr: " - #define TOPAZ_ASR_REG_OFFSET 4 #define TOPAZ_ASR_TOGGLE 0x40 #define TOPAZ_ASR_DISABLE 0x80 @@ -234,12 +234,11 @@ static int __init asr_get_base_address(void) } if (!request_region(asr_base, asr_length, "ibmasr")) { - printk(KERN_ERR PFX "address %#x already in use\n", - asr_base); + pr_err("address %#x already in use\n", asr_base); return -EBUSY; } - printk(KERN_INFO PFX "found %sASR @ addr %#x\n", type, asr_base); + pr_info("found %sASR @ addr %#x\n", type, asr_base); return 0; } @@ -332,8 +331,7 @@ static int asr_release(struct inode *inode, struct file *file) if (asr_expect_close == 42) asr_disable(); else { - printk(KERN_CRIT PFX - "unexpected close, not stopping watchdog!\n"); + pr_crit("unexpected close, not stopping watchdog!\n"); asr_toggle(); } clear_bit(0, &asr_is_open); @@ -393,7 +391,7 @@ static int __init ibmasr_init(void) rc = misc_register(&asr_miscdev); if (rc < 0) { release_region(asr_base, asr_length); - printk(KERN_ERR PFX "failed to register misc device\n"); + pr_err("failed to register misc device\n"); return rc; } |