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/mpc8xxx_wdt.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/mpc8xxx_wdt.c')
-rw-r--r-- | drivers/watchdog/mpc8xxx_wdt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 20feb4d3d791..3e335fa0f17d 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * option) any later version. | 17 | * option) any later version. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
21 | |||
20 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
21 | #include <linux/init.h> | 23 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
@@ -96,7 +98,7 @@ static void mpc8xxx_wdt_timer_ping(unsigned long arg) | |||
96 | 98 | ||
97 | static void mpc8xxx_wdt_pr_warn(const char *msg) | 99 | static void mpc8xxx_wdt_pr_warn(const char *msg) |
98 | { | 100 | { |
99 | pr_crit("mpc8xxx_wdt: %s, expect the %s soon!\n", msg, | 101 | pr_crit("%s, expect the %s soon!\n", msg, |
100 | reset ? "reset" : "machine check exception"); | 102 | reset ? "reset" : "machine check exception"); |
101 | } | 103 | } |
102 | 104 | ||
@@ -209,7 +211,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) | |||
209 | 211 | ||
210 | enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN; | 212 | enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN; |
211 | if (!enabled && wdt_type->hw_enabled) { | 213 | if (!enabled && wdt_type->hw_enabled) { |
212 | pr_info("mpc8xxx_wdt: could not be enabled in software\n"); | 214 | pr_info("could not be enabled in software\n"); |
213 | ret = -ENOSYS; | 215 | ret = -ENOSYS; |
214 | goto err_unmap; | 216 | goto err_unmap; |
215 | } | 217 | } |
@@ -226,9 +228,8 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) | |||
226 | goto err_unmap; | 228 | goto err_unmap; |
227 | #endif | 229 | #endif |
228 | 230 | ||
229 | pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " | 231 | pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d (%d seconds)\n", |
230 | "(%d seconds)\n", reset ? "reset" : "interrupt", timeout, | 232 | reset ? "reset" : "interrupt", timeout, timeout_sec); |
231 | timeout_sec); | ||
232 | 233 | ||
233 | /* | 234 | /* |
234 | * If the watchdog was previously enabled or we're running on | 235 | * If the watchdog was previously enabled or we're running on |
@@ -303,7 +304,7 @@ static int mpc8xxx_wdt_init_late(void) | |||
303 | ret = misc_register(&mpc8xxx_wdt_miscdev); | 304 | ret = misc_register(&mpc8xxx_wdt_miscdev); |
304 | if (ret) { | 305 | if (ret) { |
305 | pr_err("cannot register miscdev on minor=%d (err=%d)\n", | 306 | pr_err("cannot register miscdev on minor=%d (err=%d)\n", |
306 | WATCHDOG_MINOR, ret); | 307 | WATCHDOG_MINOR, ret); |
307 | return ret; | 308 | return ret; |
308 | } | 309 | } |
309 | return 0; | 310 | return 0; |