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/s3c2410_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/s3c2410_wdt.c')
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 404172f02c9b..ce18029011f7 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #include <linux/module.h> | 28 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
@@ -46,8 +48,6 @@ | |||
46 | 48 | ||
47 | #include <plat/regs-watchdog.h> | 49 | #include <plat/regs-watchdog.h> |
48 | 50 | ||
49 | #define PFX "s3c2410-wdt: " | ||
50 | |||
51 | #define CONFIG_S3C2410_WATCHDOG_ATBOOT (0) | 51 | #define CONFIG_S3C2410_WATCHDOG_ATBOOT (0) |
52 | #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15) | 52 | #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15) |
53 | 53 | ||
@@ -84,10 +84,11 @@ static DEFINE_SPINLOCK(wdt_lock); | |||
84 | 84 | ||
85 | /* watchdog control routines */ | 85 | /* watchdog control routines */ |
86 | 86 | ||
87 | #define DBG(msg...) do { \ | 87 | #define DBG(fmt, ...) \ |
88 | if (debug) \ | 88 | do { \ |
89 | printk(KERN_INFO msg); \ | 89 | if (debug) \ |
90 | } while (0) | 90 | pr_info(fmt, ##__VA_ARGS__); \ |
91 | } while (0) | ||
91 | 92 | ||
92 | /* functions */ | 93 | /* functions */ |
93 | 94 | ||
@@ -354,7 +355,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
354 | 355 | ||
355 | ret = s3c2410wdt_cpufreq_register(); | 356 | ret = s3c2410wdt_cpufreq_register(); |
356 | if (ret < 0) { | 357 | if (ret < 0) { |
357 | printk(KERN_ERR PFX "failed to register cpufreq\n"); | 358 | pr_err("failed to register cpufreq\n"); |
358 | goto err_clk; | 359 | goto err_clk; |
359 | } | 360 | } |
360 | 361 | ||
@@ -483,8 +484,8 @@ static int s3c2410wdt_resume(struct platform_device *dev) | |||
483 | writel(wtdat_save, wdt_base + S3C2410_WTCNT); /* Reset count */ | 484 | writel(wtdat_save, wdt_base + S3C2410_WTCNT); /* Reset count */ |
484 | writel(wtcon_save, wdt_base + S3C2410_WTCON); | 485 | writel(wtcon_save, wdt_base + S3C2410_WTCON); |
485 | 486 | ||
486 | printk(KERN_INFO PFX "watchdog %sabled\n", | 487 | pr_info("watchdog %sabled\n", |
487 | (wtcon_save & S3C2410_WTCON_ENABLE) ? "en" : "dis"); | 488 | (wtcon_save & S3C2410_WTCON_ENABLE) ? "en" : "dis"); |
488 | 489 | ||
489 | return 0; | 490 | return 0; |
490 | } | 491 | } |
@@ -518,12 +519,10 @@ static struct platform_driver s3c2410wdt_driver = { | |||
518 | }; | 519 | }; |
519 | 520 | ||
520 | 521 | ||
521 | static char banner[] __initdata = | ||
522 | KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; | ||
523 | |||
524 | static int __init watchdog_init(void) | 522 | static int __init watchdog_init(void) |
525 | { | 523 | { |
526 | printk(banner); | 524 | pr_info("S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; |
525 | |||
527 | return platform_driver_register(&s3c2410wdt_driver); | 526 | return platform_driver_register(&s3c2410wdt_driver); |
528 | } | 527 | } |
529 | 528 | ||