aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/shwdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/shwdt.c')
-rw-r--r--drivers/watchdog/shwdt.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index a267dc078daf..93958a7763e6 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -17,6 +17,9 @@
17 * Added expect close support, made emulated timeout runtime changeable 17 * Added expect close support, made emulated timeout runtime changeable
18 * general cleanups, add some ioctls 18 * general cleanups, add some ioctls
19 */ 19 */
20
21#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
22
20#include <linux/module.h> 23#include <linux/module.h>
21#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
22#include <linux/platform_device.h> 25#include <linux/platform_device.h>
@@ -72,7 +75,7 @@ static DEFINE_SPINLOCK(shwdt_lock);
72 75
73#define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */ 76#define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */
74static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ 77static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */
75static int nowayout = WATCHDOG_NOWAYOUT; 78static bool nowayout = WATCHDOG_NOWAYOUT;
76static unsigned long next_heartbeat; 79static unsigned long next_heartbeat;
77 80
78struct sh_wdt { 81struct sh_wdt {
@@ -440,20 +443,20 @@ static int __init sh_wdt_init(void)
440 clock_division_ratio > 0x7)) { 443 clock_division_ratio > 0x7)) {
441 clock_division_ratio = WTCSR_CKS_4096; 444 clock_division_ratio = WTCSR_CKS_4096;
442 445
443 pr_info("%s: divisor must be 0x5<=x<=0x7, using %d\n", 446 pr_info("divisor must be 0x5<=x<=0x7, using %d\n",
444 DRV_NAME, clock_division_ratio); 447 clock_division_ratio);
445 } 448 }
446 449
447 rc = sh_wdt_set_heartbeat(heartbeat); 450 rc = sh_wdt_set_heartbeat(heartbeat);
448 if (unlikely(rc)) { 451 if (unlikely(rc)) {
449 heartbeat = WATCHDOG_HEARTBEAT; 452 heartbeat = WATCHDOG_HEARTBEAT;
450 453
451 pr_info("%s: heartbeat value must be 1<=x<=3600, using %d\n", 454 pr_info("heartbeat value must be 1<=x<=3600, using %d\n",
452 DRV_NAME, heartbeat); 455 heartbeat);
453 } 456 }
454 457
455 pr_info("%s: configured with heartbeat=%d sec (nowayout=%d)\n", 458 pr_info("configured with heartbeat=%d sec (nowayout=%d)\n",
456 DRV_NAME, heartbeat, nowayout); 459 heartbeat, nowayout);
457 460
458 return platform_driver_register(&sh_wdt_driver); 461 return platform_driver_register(&sh_wdt_driver);
459} 462}
@@ -481,7 +484,7 @@ MODULE_PARM_DESC(heartbeat,
481 "Watchdog heartbeat in seconds. (1 <= heartbeat <= 3600, default=" 484 "Watchdog heartbeat in seconds. (1 <= heartbeat <= 3600, default="
482 __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 485 __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
483 486
484module_param(nowayout, int, 0); 487module_param(nowayout, bool, 0);
485MODULE_PARM_DESC(nowayout, 488MODULE_PARM_DESC(nowayout,
486 "Watchdog cannot be stopped once started (default=" 489 "Watchdog cannot be stopped once started (default="
487 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 490 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");