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/sbc8360.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/sbc8360.c')
-rw-r--r-- | drivers/watchdog/sbc8360.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c index 514ec23050f7..f72b6e013a93 100644 --- a/drivers/watchdog/sbc8360.c +++ b/drivers/watchdog/sbc8360.c | |||
@@ -36,6 +36,8 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
40 | |||
39 | #include <linux/module.h> | 41 | #include <linux/module.h> |
40 | #include <linux/types.h> | 42 | #include <linux/types.h> |
41 | #include <linux/miscdevice.h> | 43 | #include <linux/miscdevice.h> |
@@ -56,8 +58,6 @@ | |||
56 | static unsigned long sbc8360_is_open; | 58 | static unsigned long sbc8360_is_open; |
57 | static char expect_close; | 59 | static char expect_close; |
58 | 60 | ||
59 | #define PFX "sbc8360: " | ||
60 | |||
61 | /* | 61 | /* |
62 | * | 62 | * |
63 | * Watchdog Timer Configuration | 63 | * Watchdog Timer Configuration |
@@ -280,8 +280,7 @@ static int sbc8360_close(struct inode *inode, struct file *file) | |||
280 | if (expect_close == 42) | 280 | if (expect_close == 42) |
281 | sbc8360_stop(); | 281 | sbc8360_stop(); |
282 | else | 282 | else |
283 | printk(KERN_CRIT PFX "SBC8360 device closed unexpectedly. " | 283 | pr_crit("SBC8360 device closed unexpectedly. SBC8360 will not stop!\n"); |
284 | "SBC8360 will not stop!\n"); | ||
285 | 284 | ||
286 | clear_bit(0, &sbc8360_is_open); | 285 | clear_bit(0, &sbc8360_is_open); |
287 | expect_close = 0; | 286 | expect_close = 0; |
@@ -334,20 +333,19 @@ static int __init sbc8360_init(void) | |||
334 | unsigned long int mseconds = 60000; | 333 | unsigned long int mseconds = 60000; |
335 | 334 | ||
336 | if (timeout < 0 || timeout > 63) { | 335 | if (timeout < 0 || timeout > 63) { |
337 | printk(KERN_ERR PFX "Invalid timeout index (must be 0-63).\n"); | 336 | pr_err("Invalid timeout index (must be 0-63)\n"); |
338 | res = -EINVAL; | 337 | res = -EINVAL; |
339 | goto out; | 338 | goto out; |
340 | } | 339 | } |
341 | 340 | ||
342 | if (!request_region(SBC8360_ENABLE, 1, "SBC8360")) { | 341 | if (!request_region(SBC8360_ENABLE, 1, "SBC8360")) { |
343 | printk(KERN_ERR PFX "ENABLE method I/O %X is not available.\n", | 342 | pr_err("ENABLE method I/O %X is not available\n", |
344 | SBC8360_ENABLE); | 343 | SBC8360_ENABLE); |
345 | res = -EIO; | 344 | res = -EIO; |
346 | goto out; | 345 | goto out; |
347 | } | 346 | } |
348 | if (!request_region(SBC8360_BASETIME, 1, "SBC8360")) { | 347 | if (!request_region(SBC8360_BASETIME, 1, "SBC8360")) { |
349 | printk(KERN_ERR PFX | 348 | pr_err("BASETIME method I/O %X is not available\n", |
350 | "BASETIME method I/O %X is not available.\n", | ||
351 | SBC8360_BASETIME); | 349 | SBC8360_BASETIME); |
352 | res = -EIO; | 350 | res = -EIO; |
353 | goto out_nobasetimereg; | 351 | goto out_nobasetimereg; |
@@ -355,13 +353,13 @@ static int __init sbc8360_init(void) | |||
355 | 353 | ||
356 | res = register_reboot_notifier(&sbc8360_notifier); | 354 | res = register_reboot_notifier(&sbc8360_notifier); |
357 | if (res) { | 355 | if (res) { |
358 | printk(KERN_ERR PFX "Failed to register reboot notifier.\n"); | 356 | pr_err("Failed to register reboot notifier\n"); |
359 | goto out_noreboot; | 357 | goto out_noreboot; |
360 | } | 358 | } |
361 | 359 | ||
362 | res = misc_register(&sbc8360_miscdev); | 360 | res = misc_register(&sbc8360_miscdev); |
363 | if (res) { | 361 | if (res) { |
364 | printk(KERN_ERR PFX "failed to register misc device\n"); | 362 | pr_err("failed to register misc device\n"); |
365 | goto out_nomisc; | 363 | goto out_nomisc; |
366 | } | 364 | } |
367 | 365 | ||
@@ -378,7 +376,7 @@ static int __init sbc8360_init(void) | |||
378 | mseconds = (wd_margin + 1) * 100000; | 376 | mseconds = (wd_margin + 1) * 100000; |
379 | 377 | ||
380 | /* My kingdom for the ability to print "0.5 seconds" in the kernel! */ | 378 | /* My kingdom for the ability to print "0.5 seconds" in the kernel! */ |
381 | printk(KERN_INFO PFX "Timeout set at %ld ms.\n", mseconds); | 379 | pr_info("Timeout set at %ld ms\n", mseconds); |
382 | 380 | ||
383 | return 0; | 381 | return 0; |
384 | 382 | ||