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/ib700wdt.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/ib700wdt.c')
-rw-r--r-- | drivers/watchdog/ib700wdt.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c index 0149d8dfc81d..7df861bfdb2c 100644 --- a/drivers/watchdog/ib700wdt.c +++ b/drivers/watchdog/ib700wdt.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #include <linux/module.h> | 36 | #include <linux/module.h> |
35 | #include <linux/types.h> | 37 | #include <linux/types.h> |
36 | #include <linux/miscdevice.h> | 38 | #include <linux/miscdevice.h> |
@@ -53,7 +55,6 @@ static char expect_close; | |||
53 | 55 | ||
54 | /* Module information */ | 56 | /* Module information */ |
55 | #define DRV_NAME "ib700wdt" | 57 | #define DRV_NAME "ib700wdt" |
56 | #define PFX DRV_NAME ": " | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * | 60 | * |
@@ -246,8 +247,7 @@ static int ibwdt_close(struct inode *inode, struct file *file) | |||
246 | if (expect_close == 42) { | 247 | if (expect_close == 42) { |
247 | ibwdt_disable(); | 248 | ibwdt_disable(); |
248 | } else { | 249 | } else { |
249 | printk(KERN_CRIT PFX | 250 | pr_crit("WDT device closed unexpectedly. WDT will not stop!\n"); |
250 | "WDT device closed unexpectedly. WDT will not stop!\n"); | ||
251 | ibwdt_ping(); | 251 | ibwdt_ping(); |
252 | } | 252 | } |
253 | clear_bit(0, &ibwdt_is_open); | 253 | clear_bit(0, &ibwdt_is_open); |
@@ -284,16 +284,14 @@ static int __devinit ibwdt_probe(struct platform_device *dev) | |||
284 | 284 | ||
285 | #if WDT_START != WDT_STOP | 285 | #if WDT_START != WDT_STOP |
286 | if (!request_region(WDT_STOP, 1, "IB700 WDT")) { | 286 | if (!request_region(WDT_STOP, 1, "IB700 WDT")) { |
287 | printk(KERN_ERR PFX "STOP method I/O %X is not available.\n", | 287 | pr_err("STOP method I/O %X is not available\n", WDT_STOP); |
288 | WDT_STOP); | ||
289 | res = -EIO; | 288 | res = -EIO; |
290 | goto out_nostopreg; | 289 | goto out_nostopreg; |
291 | } | 290 | } |
292 | #endif | 291 | #endif |
293 | 292 | ||
294 | if (!request_region(WDT_START, 1, "IB700 WDT")) { | 293 | if (!request_region(WDT_START, 1, "IB700 WDT")) { |
295 | printk(KERN_ERR PFX "START method I/O %X is not available.\n", | 294 | pr_err("START method I/O %X is not available\n", WDT_START); |
296 | WDT_START); | ||
297 | res = -EIO; | 295 | res = -EIO; |
298 | goto out_nostartreg; | 296 | goto out_nostartreg; |
299 | } | 297 | } |
@@ -302,13 +300,12 @@ static int __devinit ibwdt_probe(struct platform_device *dev) | |||
302 | * if not reset to the default */ | 300 | * if not reset to the default */ |
303 | if (ibwdt_set_heartbeat(timeout)) { | 301 | if (ibwdt_set_heartbeat(timeout)) { |
304 | ibwdt_set_heartbeat(WATCHDOG_TIMEOUT); | 302 | ibwdt_set_heartbeat(WATCHDOG_TIMEOUT); |
305 | printk(KERN_INFO PFX | 303 | pr_info("timeout value must be 0<=x<=30, using %d\n", timeout); |
306 | "timeout value must be 0<=x<=30, using %d\n", timeout); | ||
307 | } | 304 | } |
308 | 305 | ||
309 | res = misc_register(&ibwdt_miscdev); | 306 | res = misc_register(&ibwdt_miscdev); |
310 | if (res) { | 307 | if (res) { |
311 | printk(KERN_ERR PFX "failed to register misc device\n"); | 308 | pr_err("failed to register misc device\n"); |
312 | goto out_nomisc; | 309 | goto out_nomisc; |
313 | } | 310 | } |
314 | return 0; | 311 | return 0; |
@@ -353,8 +350,7 @@ static int __init ibwdt_init(void) | |||
353 | { | 350 | { |
354 | int err; | 351 | int err; |
355 | 352 | ||
356 | printk(KERN_INFO PFX | 353 | pr_info("WDT driver for IB700 single board computer initialising\n"); |
357 | "WDT driver for IB700 single board computer initialising.\n"); | ||
358 | 354 | ||
359 | err = platform_driver_register(&ibwdt_driver); | 355 | err = platform_driver_register(&ibwdt_driver); |
360 | if (err) | 356 | if (err) |
@@ -378,7 +374,7 @@ static void __exit ibwdt_exit(void) | |||
378 | { | 374 | { |
379 | platform_device_unregister(ibwdt_platform_device); | 375 | platform_device_unregister(ibwdt_platform_device); |
380 | platform_driver_unregister(&ibwdt_driver); | 376 | platform_driver_unregister(&ibwdt_driver); |
381 | printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); | 377 | pr_info("Watchdog Module Unloaded\n"); |
382 | } | 378 | } |
383 | 379 | ||
384 | module_init(ibwdt_init); | 380 | module_init(ibwdt_init); |