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/sbc_epx_c3.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'drivers/watchdog/sbc_epx_c3.c') diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c index eaca366b7234..1a13d36c5f12 100644 --- a/drivers/watchdog/sbc_epx_c3.c +++ b/drivers/watchdog/sbc_epx_c3.c @@ -13,6 +13,8 @@ * based on softdog.c by Alan Cox */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -28,7 +30,6 @@ #include #include -#define PFX "epx_c3: " static int epx_c3_alive; #define WATCHDOG_TIMEOUT 1 /* 1 sec default timeout */ @@ -51,7 +52,7 @@ static void epx_c3_stop(void) outb(0, EPXC3_WATCHDOG_CTL_REG); - printk(KERN_INFO PFX "Stopped watchdog timer.\n"); + pr_info("Stopped watchdog timer\n"); } static void epx_c3_pet(void) @@ -75,7 +76,7 @@ static int epx_c3_open(struct inode *inode, struct file *file) epx_c3_pet(); epx_c3_alive = 1; - printk(KERN_INFO "Started watchdog timer.\n"); + pr_info("Started watchdog timer\n"); return nonseekable_open(inode, file); } @@ -173,9 +174,6 @@ static struct notifier_block epx_c3_notifier = { .notifier_call = epx_c3_notify_sys, }; -static const char banner[] __initconst = KERN_INFO PFX - "Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n"; - static int __init watchdog_init(void) { int ret; @@ -185,20 +183,19 @@ static int __init watchdog_init(void) ret = register_reboot_notifier(&epx_c3_notifier); if (ret) { - printk(KERN_ERR PFX "cannot register reboot notifier " - "(err=%d)\n", ret); + pr_err("cannot register reboot notifier (err=%d)\n", ret); goto out; } ret = misc_register(&epx_c3_miscdev); if (ret) { - 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); unregister_reboot_notifier(&epx_c3_notifier); goto out; } - printk(banner); + pr_info("Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n"); return 0; -- cgit v1.2.3