diff options
author | Joe Perches <joe@perches.com> | 2012-02-15 18:06:19 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 13:59:26 -0400 |
commit | 27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch) | |
tree | 06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/hpwdt.c | |
parent | 7cbc353540c31ffaf65ad44d89b955be0f1d04dc (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/hpwdt.c')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 3c166d3f4e55..54c64f56af2a 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/device.h> | 18 | #include <linux/device.h> |
17 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
18 | #include <linux/init.h> | 20 | #include <linux/init.h> |
@@ -235,8 +237,7 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
235 | asminline_call(&cmn_regs, bios32_entrypoint); | 237 | asminline_call(&cmn_regs, bios32_entrypoint); |
236 | 238 | ||
237 | if (cmn_regs.u1.ral != 0) { | 239 | if (cmn_regs.u1.ral != 0) { |
238 | printk(KERN_WARNING | 240 | pr_warn("Call succeeded but with an error: 0x%x\n", |
239 | "hpwdt: Call succeeded but with an error: 0x%x\n", | ||
240 | cmn_regs.u1.ral); | 241 | cmn_regs.u1.ral); |
241 | } else { | 242 | } else { |
242 | physical_bios_base = cmn_regs.u2.rebx; | 243 | physical_bios_base = cmn_regs.u2.rebx; |
@@ -256,14 +257,10 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
256 | } | 257 | } |
257 | } | 258 | } |
258 | 259 | ||
259 | printk(KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n", | 260 | pr_debug("CRU Base Address: 0x%lx\n", physical_bios_base); |
260 | physical_bios_base); | 261 | pr_debug("CRU Offset Address: 0x%lx\n", physical_bios_offset); |
261 | printk(KERN_DEBUG "hpwdt: CRU Offset Address: 0x%lx\n", | 262 | pr_debug("CRU Length: 0x%lx\n", cru_length); |
262 | physical_bios_offset); | 263 | pr_debug("CRU Mapped Address: %p\n", &cru_rom_addr); |
263 | printk(KERN_DEBUG "hpwdt: CRU Length: 0x%lx\n", | ||
264 | cru_length); | ||
265 | printk(KERN_DEBUG "hpwdt: CRU Mapped Address: %p\n", | ||
266 | &cru_rom_addr); | ||
267 | } | 264 | } |
268 | iounmap(bios32_map); | 265 | iounmap(bios32_map); |
269 | return retval; | 266 | return retval; |
@@ -458,16 +455,13 @@ static void hpwdt_ping(void) | |||
458 | static int hpwdt_change_timer(int new_margin) | 455 | static int hpwdt_change_timer(int new_margin) |
459 | { | 456 | { |
460 | if (new_margin < 1 || new_margin > HPWDT_MAX_TIMER) { | 457 | if (new_margin < 1 || new_margin > HPWDT_MAX_TIMER) { |
461 | printk(KERN_WARNING | 458 | pr_warn("New value passed in is invalid: %d seconds\n", |
462 | "hpwdt: New value passed in is invalid: %d seconds.\n", | ||
463 | new_margin); | 459 | new_margin); |
464 | return -EINVAL; | 460 | return -EINVAL; |
465 | } | 461 | } |
466 | 462 | ||
467 | soft_margin = new_margin; | 463 | soft_margin = new_margin; |
468 | printk(KERN_DEBUG | 464 | pr_debug("New timer passed in is %d seconds\n", new_margin); |
469 | "hpwdt: New timer passed in is %d seconds.\n", | ||
470 | new_margin); | ||
471 | reload = SECS_TO_TICKS(soft_margin); | 465 | reload = SECS_TO_TICKS(soft_margin); |
472 | 466 | ||
473 | return 0; | 467 | return 0; |
@@ -535,8 +529,7 @@ static int hpwdt_release(struct inode *inode, struct file *file) | |||
535 | if (expect_release == 42) { | 529 | if (expect_release == 42) { |
536 | hpwdt_stop(); | 530 | hpwdt_stop(); |
537 | } else { | 531 | } else { |
538 | printk(KERN_CRIT | 532 | pr_crit("Unexpected close, not stopping watchdog!\n"); |
539 | "hpwdt: Unexpected close, not stopping watchdog!\n"); | ||
540 | hpwdt_ping(); | 533 | hpwdt_ping(); |
541 | } | 534 | } |
542 | 535 | ||