aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sb_wdog.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:06:19 -0500
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 13:59:26 -0400
commit27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch)
tree06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/sb_wdog.c
parent7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff)
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/sb_wdog.c')
-rw-r--r--drivers/watchdog/sb_wdog.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index b01a30e5a663..25c7a3f9652d 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -43,6 +43,9 @@
43 * version 1 or 2 as published by the Free Software Foundation. 43 * version 1 or 2 as published by the Free Software Foundation.
44 * 44 *
45 */ 45 */
46
47#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
48
46#include <linux/module.h> 49#include <linux/module.h>
47#include <linux/io.h> 50#include <linux/io.h>
48#include <linux/uaccess.h> 51#include <linux/uaccess.h>
@@ -125,9 +128,8 @@ static int sbwdog_release(struct inode *inode, struct file *file)
125 __raw_writeb(0, user_dog); 128 __raw_writeb(0, user_dog);
126 module_put(THIS_MODULE); 129 module_put(THIS_MODULE);
127 } else { 130 } else {
128 printk(KERN_CRIT 131 pr_crit("%s: Unexpected close, not stopping watchdog!\n",
129 "%s: Unexpected close, not stopping watchdog!\n", 132 ident.identity);
130 ident.identity);
131 sbwdog_pet(user_dog); 133 sbwdog_pet(user_dog);
132 } 134 }
133 clear_bit(0, &sbwdog_gate); 135 clear_bit(0, &sbwdog_gate);
@@ -269,7 +271,7 @@ irqreturn_t sbwdog_interrupt(int irq, void *addr)
269 * if it's the second watchdog timer, it's for those users 271 * if it's the second watchdog timer, it's for those users
270 */ 272 */
271 if (wd_cfg_reg == user_dog) 273 if (wd_cfg_reg == user_dog)
272 printk(KERN_CRIT "%s in danger of initiating system reset " 274 pr_crit("%s in danger of initiating system reset "
273 "in %ld.%01ld seconds\n", 275 "in %ld.%01ld seconds\n",
274 ident.identity, 276 ident.identity,
275 wd_init / 1000000, (wd_init / 100000) % 10); 277 wd_init / 1000000, (wd_init / 100000) % 10);
@@ -290,9 +292,8 @@ static int __init sbwdog_init(void)
290 */ 292 */
291 ret = register_reboot_notifier(&sbwdog_notifier); 293 ret = register_reboot_notifier(&sbwdog_notifier);
292 if (ret) { 294 if (ret) {
293 printk(KERN_ERR 295 pr_err("%s: cannot register reboot notifier (err=%d)\n",
294 "%s: cannot register reboot notifier (err=%d)\n", 296 ident.identity, ret);
295 ident.identity, ret);
296 return ret; 297 return ret;
297 } 298 }
298 299
@@ -303,16 +304,16 @@ static int __init sbwdog_init(void)
303 ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED, 304 ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED,
304 ident.identity, (void *)user_dog); 305 ident.identity, (void *)user_dog);
305 if (ret) { 306 if (ret) {
306 printk(KERN_ERR "%s: failed to request irq 1 - %d\n", 307 pr_err("%s: failed to request irq 1 - %d\n",
307 ident.identity, ret); 308 ident.identity, ret);
308 goto out; 309 goto out;
309 } 310 }
310 311
311 ret = misc_register(&sbwdog_miscdev); 312 ret = misc_register(&sbwdog_miscdev);
312 if (ret == 0) { 313 if (ret == 0) {
313 printk(KERN_INFO "%s: timeout is %ld.%ld secs\n", 314 pr_info("%s: timeout is %ld.%ld secs\n",
314 ident.identity, 315 ident.identity,
315 timeout / 1000000, (timeout / 100000) % 10); 316 timeout / 1000000, (timeout / 100000) % 10);
316 return 0; 317 return 0;
317 } 318 }
318 free_irq(1, (void *)user_dog); 319 free_irq(1, (void *)user_dog);
@@ -353,8 +354,7 @@ void platform_wd_setup(void)
353 ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED, 354 ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED,
354 "Kernel Watchdog", IOADDR(A_SCD_WDOG_CFG_0)); 355 "Kernel Watchdog", IOADDR(A_SCD_WDOG_CFG_0));
355 if (ret) { 356 if (ret) {
356 printk(KERN_CRIT 357 pr_crit("Watchdog IRQ zero(0) failed to be requested - %d\n", ret);
357 "Watchdog IRQ zero(0) failed to be requested - %d\n", ret);
358 } 358 }
359} 359}
360 360