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/sch311x_wdt.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/watchdog/sch311x_wdt.c') diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index 029467e3463..1702c3e9bce 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c @@ -18,6 +18,8 @@ * Includes, defines, variables, module parameters, ... */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + /* Includes */ #include /* For module specific items */ #include /* For new moduleparam's */ @@ -37,7 +39,6 @@ /* Module and version information */ #define DRV_NAME "sch311x_wdt" -#define PFX DRV_NAME ": " /* Runtime registers */ #define RESGEN 0x1d @@ -323,8 +324,7 @@ static int sch311x_wdt_close(struct inode *inode, struct file *file) if (sch311x_wdt_expect_close == 42) { sch311x_wdt_stop(); } else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); sch311x_wdt_keepalive(); } clear_bit(0, &sch311x_wdt_is_open); @@ -504,20 +504,19 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr) /* Check if Logical Device Register is currently active */ if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0) - printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n"); + pr_info("Seems that LDN 0x0a is not active...\n"); /* Get the base address of the runtime registers */ base_addr = (sch311x_sio_inb(sio_config_port, 0x60) << 8) | sch311x_sio_inb(sio_config_port, 0x61); if (!base_addr) { - printk(KERN_ERR PFX "Base address not set.\n"); + pr_err("Base address not set\n"); err = -ENODEV; goto exit; } *addr = base_addr; - printk(KERN_INFO PFX "Found an SMSC SCH311%d chip at 0x%04x\n", - dev_id, base_addr); + pr_info("Found an SMSC SCH311%d chip at 0x%04x\n", dev_id, base_addr); exit: sch311x_sio_exit(sio_config_port); -- cgit v1.2.3-70-g09d2