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/pika_wdt.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'drivers/watchdog/pika_wdt.c') diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c index 2d22e996e996..e2877623ac44 100644 --- a/drivers/watchdog/pika_wdt.c +++ b/drivers/watchdog/pika_wdt.c @@ -5,6 +5,8 @@ * Sean MacLennan */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -23,7 +25,6 @@ #include #define DRV_NAME "PIKA-WDT" -#define PFX DRV_NAME ": " /* Hardware timeout in seconds */ #define WDT_HW_TIMEOUT 2 @@ -90,7 +91,7 @@ static void pikawdt_ping(unsigned long data) pikawdt_reset(); mod_timer(&pikawdt_private.timer, jiffies + WDT_TIMEOUT); } else - printk(KERN_CRIT PFX "I will reset your machine !\n"); + pr_crit("I will reset your machine !\n"); } @@ -228,14 +229,14 @@ static int __init pikawdt_init(void) np = of_find_compatible_node(NULL, NULL, "pika,fpga"); if (np == NULL) { - printk(KERN_ERR PFX "Unable to find fpga.\n"); + pr_err("Unable to find fpga\n"); return -ENOENT; } pikawdt_private.fpga = of_iomap(np, 0); of_node_put(np); if (pikawdt_private.fpga == NULL) { - printk(KERN_ERR PFX "Unable to map fpga.\n"); + pr_err("Unable to map fpga\n"); return -ENOMEM; } @@ -244,7 +245,7 @@ static int __init pikawdt_init(void) /* POST information is in the sd area. */ np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd"); if (np == NULL) { - printk(KERN_ERR PFX "Unable to find fpga-sd.\n"); + pr_err("Unable to find fpga-sd\n"); ret = -ENOENT; goto out; } @@ -252,7 +253,7 @@ static int __init pikawdt_init(void) fpga = of_iomap(np, 0); of_node_put(np); if (fpga == NULL) { - printk(KERN_ERR PFX "Unable to map fpga-sd.\n"); + pr_err("Unable to map fpga-sd\n"); ret = -ENOMEM; goto out; } @@ -271,12 +272,12 @@ static int __init pikawdt_init(void) ret = misc_register(&pikawdt_miscdev); if (ret) { - printk(KERN_ERR PFX "Unable to register miscdev.\n"); + pr_err("Unable to register miscdev\n"); goto out; } - printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", - heartbeat, nowayout); + pr_info("initialized. heartbeat=%d sec (nowayout=%d)\n", + heartbeat, nowayout); return 0; out: -- cgit v1.2.3