diff options
author | Joe Perches <joe@perches.com> | 2012-02-15 15:06:19 -0800 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 19:59:26 +0200 |
commit | 27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch) | |
tree | 06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/scx200_wdt.c | |
parent | 7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff) | |
download | kernel_goldelico_gta04-27c766aaacb265d625dc634bf7903f7f9fd0c697.zip kernel_goldelico_gta04-27c766aaacb265d625dc634bf7903f7f9fd0c697.tar.gz kernel_goldelico_gta04-27c766aaacb265d625dc634bf7903f7f9fd0c697.tar.bz2 |
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/scx200_wdt.c')
-rw-r--r-- | drivers/watchdog/scx200_wdt.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/watchdog/scx200_wdt.c b/drivers/watchdog/scx200_wdt.c index e67b76c..35ada2e 100644 --- a/drivers/watchdog/scx200_wdt.c +++ b/drivers/watchdog/scx200_wdt.c @@ -17,6 +17,8 @@ of any nature resulting due to the use of this software. This software is provided AS-IS with no warranties. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> @@ -30,7 +32,7 @@ #include <linux/uaccess.h> #include <linux/io.h> -#define NAME "scx200_wdt" +#define DEBUG MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>"); MODULE_DESCRIPTION("NatSemi SCx200 Watchdog Driver"); @@ -66,14 +68,13 @@ static void scx200_wdt_ping(void) static void scx200_wdt_update_margin(void) { - printk(KERN_INFO NAME ": timer margin %d seconds\n", margin); + pr_info("timer margin %d seconds\n", margin); wdto_restart = margin * W_SCALE; } static void scx200_wdt_enable(void) { - printk(KERN_DEBUG NAME ": enabling watchdog timer, wdto_restart = %d\n", - wdto_restart); + pr_debug("enabling watchdog timer, wdto_restart = %d\n", wdto_restart); spin_lock(&scx_lock); outw(0, scx200_cb_base + SCx200_WDT_WDTO); @@ -86,7 +87,7 @@ static void scx200_wdt_enable(void) static void scx200_wdt_disable(void) { - printk(KERN_DEBUG NAME ": disabling watchdog timer\n"); + pr_debug("disabling watchdog timer\n"); spin_lock(&scx_lock); outw(0, scx200_cb_base + SCx200_WDT_WDTO); @@ -108,9 +109,7 @@ static int scx200_wdt_open(struct inode *inode, struct file *file) static int scx200_wdt_release(struct inode *inode, struct file *file) { if (expect_close != 42) - printk(KERN_WARNING NAME - ": watchdog device closed unexpectedly, " - "will not disable the watchdog timer\n"); + pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); else if (!nowayout) scx200_wdt_disable(); expect_close = 0; @@ -219,7 +218,7 @@ static int __init scx200_wdt_init(void) { int r; - printk(KERN_DEBUG NAME ": NatSemi SCx200 Watchdog Driver\n"); + pr_debug("NatSemi SCx200 Watchdog Driver\n"); /* check that we have found the configuration block */ if (!scx200_cb_present()) @@ -228,7 +227,7 @@ static int __init scx200_wdt_init(void) if (!request_region(scx200_cb_base + SCx200_WDT_OFFSET, SCx200_WDT_SIZE, "NatSemi SCx200 Watchdog")) { - printk(KERN_WARNING NAME ": watchdog I/O region busy\n"); + pr_warn("watchdog I/O region busy\n"); return -EBUSY; } @@ -237,7 +236,7 @@ static int __init scx200_wdt_init(void) r = register_reboot_notifier(&scx200_wdt_notifier); if (r) { - printk(KERN_ERR NAME ": unable to register reboot notifier"); + pr_err("unable to register reboot notifier\n"); release_region(scx200_cb_base + SCx200_WDT_OFFSET, SCx200_WDT_SIZE); return r; |