aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/alim1535_wdt.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:06:19 -0500
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 13:59:26 -0400
commit27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch)
tree06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/alim1535_wdt.c
parent7cbc353540c31ffaf65ad44d89b955be0f1d04dc (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/alim1535_wdt.c')
-rw-r--r--drivers/watchdog/alim1535_wdt.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index f16dcbd475fb..e802f5e02418 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -7,6 +7,8 @@
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9 9
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
10#include <linux/module.h> 12#include <linux/module.h>
11#include <linux/moduleparam.h> 13#include <linux/moduleparam.h>
12#include <linux/types.h> 14#include <linux/types.h>
@@ -22,7 +24,6 @@
22#include <linux/io.h> 24#include <linux/io.h>
23 25
24#define WATCHDOG_NAME "ALi_M1535" 26#define WATCHDOG_NAME "ALi_M1535"
25#define PFX WATCHDOG_NAME ": "
26#define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ 27#define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */
27 28
28/* internal variables */ 29/* internal variables */
@@ -268,8 +269,7 @@ static int ali_release(struct inode *inode, struct file *file)
268 if (ali_expect_release == 42) 269 if (ali_expect_release == 42)
269 ali_stop(); 270 ali_stop();
270 else { 271 else {
271 printk(KERN_CRIT PFX 272 pr_crit("Unexpected close, not stopping watchdog!\n");
272 "Unexpected close, not stopping watchdog!\n");
273 ali_keepalive(); 273 ali_keepalive();
274 } 274 }
275 clear_bit(0, &ali_is_open); 275 clear_bit(0, &ali_is_open);
@@ -399,9 +399,8 @@ static int __init watchdog_init(void)
399 if not reset to the default */ 399 if not reset to the default */
400 if (timeout < 1 || timeout >= 18000) { 400 if (timeout < 1 || timeout >= 18000) {
401 timeout = WATCHDOG_TIMEOUT; 401 timeout = WATCHDOG_TIMEOUT;
402 printk(KERN_INFO PFX 402 pr_info("timeout value must be 0 < timeout < 18000, using %d\n",
403 "timeout value must be 0 < timeout < 18000, using %d\n", 403 timeout);
404 timeout);
405 } 404 }
406 405
407 /* Calculate the watchdog's timeout */ 406 /* Calculate the watchdog's timeout */
@@ -409,20 +408,18 @@ static int __init watchdog_init(void)
409 408
410 ret = register_reboot_notifier(&ali_notifier); 409 ret = register_reboot_notifier(&ali_notifier);
411 if (ret != 0) { 410 if (ret != 0) {
412 printk(KERN_ERR PFX 411 pr_err("cannot register reboot notifier (err=%d)\n", ret);
413 "cannot register reboot notifier (err=%d)\n", ret);
414 goto out; 412 goto out;
415 } 413 }
416 414
417 ret = misc_register(&ali_miscdev); 415 ret = misc_register(&ali_miscdev);
418 if (ret != 0) { 416 if (ret != 0) {
419 printk(KERN_ERR PFX 417 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
420 "cannot register miscdev on minor=%d (err=%d)\n", 418 WATCHDOG_MINOR, ret);
421 WATCHDOG_MINOR, ret);
422 goto unreg_reboot; 419 goto unreg_reboot;
423 } 420 }
424 421
425 printk(KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d)\n", 422 pr_info("initialized. timeout=%d sec (nowayout=%d)\n",
426 timeout, nowayout); 423 timeout, nowayout);
427 424
428out: 425out: