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/sbc8360.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/sbc8360.c')
-rw-r--r-- | drivers/watchdog/sbc8360.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c index 514ec23050f7..f72b6e013a93 100644 --- a/drivers/watchdog/sbc8360.c +++ b/drivers/watchdog/sbc8360.c @@ -36,6 +36,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/types.h> #include <linux/miscdevice.h> @@ -56,8 +58,6 @@ static unsigned long sbc8360_is_open; static char expect_close; -#define PFX "sbc8360: " - /* * * Watchdog Timer Configuration @@ -280,8 +280,7 @@ static int sbc8360_close(struct inode *inode, struct file *file) if (expect_close == 42) sbc8360_stop(); else - printk(KERN_CRIT PFX "SBC8360 device closed unexpectedly. " - "SBC8360 will not stop!\n"); + pr_crit("SBC8360 device closed unexpectedly. SBC8360 will not stop!\n"); clear_bit(0, &sbc8360_is_open); expect_close = 0; @@ -334,20 +333,19 @@ static int __init sbc8360_init(void) unsigned long int mseconds = 60000; if (timeout < 0 || timeout > 63) { - printk(KERN_ERR PFX "Invalid timeout index (must be 0-63).\n"); + pr_err("Invalid timeout index (must be 0-63)\n"); res = -EINVAL; goto out; } if (!request_region(SBC8360_ENABLE, 1, "SBC8360")) { - printk(KERN_ERR PFX "ENABLE method I/O %X is not available.\n", + pr_err("ENABLE method I/O %X is not available\n", SBC8360_ENABLE); res = -EIO; goto out; } if (!request_region(SBC8360_BASETIME, 1, "SBC8360")) { - printk(KERN_ERR PFX - "BASETIME method I/O %X is not available.\n", + pr_err("BASETIME method I/O %X is not available\n", SBC8360_BASETIME); res = -EIO; goto out_nobasetimereg; @@ -355,13 +353,13 @@ static int __init sbc8360_init(void) res = register_reboot_notifier(&sbc8360_notifier); if (res) { - printk(KERN_ERR PFX "Failed to register reboot notifier.\n"); + pr_err("Failed to register reboot notifier\n"); goto out_noreboot; } res = misc_register(&sbc8360_miscdev); if (res) { - printk(KERN_ERR PFX "failed to register misc device\n"); + pr_err("failed to register misc device\n"); goto out_nomisc; } @@ -378,7 +376,7 @@ static int __init sbc8360_init(void) mseconds = (wd_margin + 1) * 100000; /* My kingdom for the ability to print "0.5 seconds" in the kernel! */ - printk(KERN_INFO PFX "Timeout set at %ld ms.\n", mseconds); + pr_info("Timeout set at %ld ms\n", mseconds); return 0; |