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/xen_wdt.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'drivers/watchdog/xen_wdt.c') diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c index 49bd9d395562..79aa7f96c246 100644 --- a/drivers/watchdog/xen_wdt.c +++ b/drivers/watchdog/xen_wdt.c @@ -9,9 +9,10 @@ * 2 of the License, or (at your option) any later version. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #define DRV_NAME "wdt" #define DRV_VERSION "0.01" -#define PFX DRV_NAME ": " #include #include @@ -134,8 +135,7 @@ static int xen_wdt_release(struct inode *inode, struct file *file) if (expect_release) xen_wdt_stop(); else { - printk(KERN_CRIT PFX - "unexpected close, not stopping watchdog!\n"); + pr_crit("unexpected close, not stopping watchdog!\n"); xen_wdt_kick(); } is_active = false; @@ -251,30 +251,27 @@ static int __devinit xen_wdt_probe(struct platform_device *dev) case -EINVAL: if (!timeout) { timeout = WATCHDOG_TIMEOUT; - printk(KERN_INFO PFX - "timeout value invalid, using %d\n", timeout); + pr_info("timeout value invalid, using %d\n", timeout); } ret = misc_register(&xen_wdt_miscdev); if (ret) { - printk(KERN_ERR PFX - "cannot register miscdev on minor=%d (%d)\n", + pr_err("cannot register miscdev on minor=%d (%d)\n", WATCHDOG_MINOR, ret); break; } - printk(KERN_INFO PFX - "initialized (timeout=%ds, nowayout=%d)\n", - timeout, nowayout); + pr_info("initialized (timeout=%ds, nowayout=%d)\n", + timeout, nowayout); break; case -ENOSYS: - printk(KERN_INFO PFX "not supported\n"); + pr_info("not supported\n"); ret = -ENODEV; break; default: - printk(KERN_INFO PFX "bogus return value %d\n", ret); + pr_info("bogus return value %d\n", ret); break; } @@ -326,7 +323,7 @@ static int __init xen_wdt_init_module(void) if (!xen_domain()) return -ENODEV; - printk(KERN_INFO PFX "Xen WatchDog Timer Driver v%s\n", DRV_VERSION); + pr_info("Xen WatchDog Timer Driver v%s\n", DRV_VERSION); err = platform_driver_register(&xen_wdt_driver); if (err) @@ -346,7 +343,7 @@ static void __exit xen_wdt_cleanup_module(void) { platform_device_unregister(platform_device); platform_driver_unregister(&xen_wdt_driver); - printk(KERN_INFO PFX "module unloaded\n"); + pr_info("module unloaded\n"); } module_init(xen_wdt_init_module); -- cgit v1.2.3