From 27c766aaacb265d625dc634bf7903f7f9fd0c697 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 15 Feb 2012 15:06:19 -0800 Subject: watchdog: Use pr_ and pr_ 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 Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/sbc8360.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'drivers/watchdog/sbc8360.c') 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 #include #include @@ -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; -- cgit v1.2.3-55-g7522