diff options
Diffstat (limited to 'drivers/watchdog/sch311x_wdt.c')
-rw-r--r-- | drivers/watchdog/sch311x_wdt.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index 029467e34636..bd86f32d63ab 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Includes, defines, variables, module parameters, ... | 18 | * Includes, defines, variables, module parameters, ... |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | /* Includes */ | 23 | /* Includes */ |
22 | #include <linux/module.h> /* For module specific items */ | 24 | #include <linux/module.h> /* For module specific items */ |
23 | #include <linux/moduleparam.h> /* For new moduleparam's */ | 25 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
@@ -37,7 +39,6 @@ | |||
37 | 39 | ||
38 | /* Module and version information */ | 40 | /* Module and version information */ |
39 | #define DRV_NAME "sch311x_wdt" | 41 | #define DRV_NAME "sch311x_wdt" |
40 | #define PFX DRV_NAME ": " | ||
41 | 42 | ||
42 | /* Runtime registers */ | 43 | /* Runtime registers */ |
43 | #define RESGEN 0x1d | 44 | #define RESGEN 0x1d |
@@ -79,8 +80,8 @@ MODULE_PARM_DESC(timeout, | |||
79 | "Watchdog timeout in seconds. 1<= timeout <=15300, default=" | 80 | "Watchdog timeout in seconds. 1<= timeout <=15300, default=" |
80 | __MODULE_STRING(WATCHDOG_TIMEOUT) "."); | 81 | __MODULE_STRING(WATCHDOG_TIMEOUT) "."); |
81 | 82 | ||
82 | static int nowayout = WATCHDOG_NOWAYOUT; | 83 | static bool nowayout = WATCHDOG_NOWAYOUT; |
83 | module_param(nowayout, int, 0); | 84 | module_param(nowayout, bool, 0); |
84 | MODULE_PARM_DESC(nowayout, | 85 | MODULE_PARM_DESC(nowayout, |
85 | "Watchdog cannot be stopped once started (default=" | 86 | "Watchdog cannot be stopped once started (default=" |
86 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 87 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
@@ -323,8 +324,7 @@ static int sch311x_wdt_close(struct inode *inode, struct file *file) | |||
323 | if (sch311x_wdt_expect_close == 42) { | 324 | if (sch311x_wdt_expect_close == 42) { |
324 | sch311x_wdt_stop(); | 325 | sch311x_wdt_stop(); |
325 | } else { | 326 | } else { |
326 | printk(KERN_CRIT PFX | 327 | pr_crit("Unexpected close, not stopping watchdog!\n"); |
327 | "Unexpected close, not stopping watchdog!\n"); | ||
328 | sch311x_wdt_keepalive(); | 328 | sch311x_wdt_keepalive(); |
329 | } | 329 | } |
330 | clear_bit(0, &sch311x_wdt_is_open); | 330 | clear_bit(0, &sch311x_wdt_is_open); |
@@ -504,20 +504,19 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr) | |||
504 | 504 | ||
505 | /* Check if Logical Device Register is currently active */ | 505 | /* Check if Logical Device Register is currently active */ |
506 | if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0) | 506 | if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0) |
507 | printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n"); | 507 | pr_info("Seems that LDN 0x0a is not active...\n"); |
508 | 508 | ||
509 | /* Get the base address of the runtime registers */ | 509 | /* Get the base address of the runtime registers */ |
510 | base_addr = (sch311x_sio_inb(sio_config_port, 0x60) << 8) | | 510 | base_addr = (sch311x_sio_inb(sio_config_port, 0x60) << 8) | |
511 | sch311x_sio_inb(sio_config_port, 0x61); | 511 | sch311x_sio_inb(sio_config_port, 0x61); |
512 | if (!base_addr) { | 512 | if (!base_addr) { |
513 | printk(KERN_ERR PFX "Base address not set.\n"); | 513 | pr_err("Base address not set\n"); |
514 | err = -ENODEV; | 514 | err = -ENODEV; |
515 | goto exit; | 515 | goto exit; |
516 | } | 516 | } |
517 | *addr = base_addr; | 517 | *addr = base_addr; |
518 | 518 | ||
519 | printk(KERN_INFO PFX "Found an SMSC SCH311%d chip at 0x%04x\n", | 519 | pr_info("Found an SMSC SCH311%d chip at 0x%04x\n", dev_id, base_addr); |
520 | dev_id, base_addr); | ||
521 | 520 | ||
522 | exit: | 521 | exit: |
523 | sch311x_sio_exit(sio_config_port); | 522 | sch311x_sio_exit(sio_config_port); |