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/eurotechwdt.c | |
parent | 7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff) | |
download | talos-obmc-linux-27c766aaacb265d625dc634bf7903f7f9fd0c697.tar.gz talos-obmc-linux-27c766aaacb265d625dc634bf7903f7f9fd0c697.zip |
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/eurotechwdt.c')
-rw-r--r-- | drivers/watchdog/eurotechwdt.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c index 3946c51099c0..22d967a5ac8c 100644 --- a/drivers/watchdog/eurotechwdt.c +++ b/drivers/watchdog/eurotechwdt.c @@ -45,6 +45,8 @@ * of the on-board SUPER I/O device SMSC FDC 37B782. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/interrupt.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -144,11 +146,11 @@ static void eurwdt_activate_timer(void) /* Setting interrupt line */ if (irq == 2 || irq > 15 || irq < 0) { - printk(KERN_ERR ": invalid irq number\n"); + pr_err("invalid irq number\n"); irq = 0; /* if invalid we disable interrupt */ } if (irq == 0) - printk(KERN_INFO ": interrupt disabled\n"); + pr_info("interrupt disabled\n"); eurwdt_write_reg(WDT_TIMER_CFG, irq << 4); @@ -163,12 +165,12 @@ static void eurwdt_activate_timer(void) static irqreturn_t eurwdt_interrupt(int irq, void *dev_id) { - printk(KERN_CRIT "timeout WDT timeout\n"); + pr_crit("timeout WDT timeout\n"); #ifdef ONLY_TESTING - printk(KERN_CRIT "Would Reboot.\n"); + pr_crit("Would Reboot\n"); #else - printk(KERN_CRIT "Initiating system reboot.\n"); + pr_crit("Initiating system reboot\n"); emergency_restart(); #endif return IRQ_HANDLED; @@ -335,8 +337,7 @@ static int eurwdt_release(struct inode *inode, struct file *file) if (eur_expect_close == 42) eurwdt_disable_timer(); else { - printk(KERN_CRIT - "eurwdt: Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); eurwdt_ping(); } clear_bit(0, &eurwdt_is_open); @@ -429,35 +430,32 @@ static int __init eurwdt_init(void) ret = request_irq(irq, eurwdt_interrupt, 0, "eurwdt", NULL); if (ret) { - printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq); + pr_err("IRQ %d is not free\n", irq); goto out; } if (!request_region(io, 2, "eurwdt")) { - printk(KERN_ERR "eurwdt: IO %X is not free.\n", io); + pr_err("IO %X is not free\n", io); ret = -EBUSY; goto outirq; } ret = register_reboot_notifier(&eurwdt_notifier); if (ret) { - printk(KERN_ERR - "eurwdt: can't register reboot notifier (err=%d)\n", ret); + pr_err("can't register reboot notifier (err=%d)\n", ret); goto outreg; } ret = misc_register(&eurwdt_miscdev); if (ret) { - printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n", - WATCHDOG_MINOR); + pr_err("can't misc_register on minor=%d\n", WATCHDOG_MINOR); goto outreboot; } eurwdt_unlock_chip(); ret = 0; - printk(KERN_INFO "Eurotech WDT driver 0.01 at %X (Interrupt %d)" - " - timeout event: %s\n", + pr_info("Eurotech WDT driver 0.01 at %X (Interrupt %d) - timeout event: %s\n", io, irq, (!strcmp("int", ev) ? "int" : "reboot")); out: |