aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-05-01 12:46:15 -0400
committerWim Van Sebroeck <wim@iguana.be>2010-05-25 05:03:52 -0400
commit76550d3292ba1b0dd1ff0a13d78a2718eba599c7 (patch)
treeee6f77e3434def57114aff43b12c79673a0f22a1
parent42bd5d499455fe4235bb82cffe937a4089a8bba9 (diff)
watchdog: fix several MODULE_PARM_DESC strings
Fix MODULE_PARM_DESC() strings in several watchdog drivers. Some are simple as add a parenthesis. Others are problems from __stringify() being used on a variable name instead of a macro name, so the variable name is produced in the string instead of its build-time value. In these cases, create a macro for the value so that the module param description string is useful. Only pc87413_wdt has been built (due to toolchains). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c2
-rw-r--r--drivers/watchdog/pc87413_wdt.c9
-rw-r--r--drivers/watchdog/pnx833x_wdt.c11
-rw-r--r--drivers/watchdog/s3c2410_wdt.c6
-rw-r--r--drivers/watchdog/shwdt.c2
-rw-r--r--drivers/watchdog/wdt977.c2
6 files changed, 19 insertions, 13 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 7b55974191dd..6622335773bb 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -53,7 +53,7 @@ static int mpc8xxx_wdt_init_late(void);
53static u16 timeout = 0xffff; 53static u16 timeout = 0xffff;
54module_param(timeout, ushort, 0); 54module_param(timeout, ushort, 0);
55MODULE_PARM_DESC(timeout, 55MODULE_PARM_DESC(timeout,
56 "Watchdog timeout in ticks. (0<timeout<65536, default=65535"); 56 "Watchdog timeout in ticks. (0<timeout<65536, default=65535)");
57 57
58static int reset = 1; 58static int reset = 1;
59module_param(reset, bool, 0); 59module_param(reset, bool, 0);
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c
index d3aa2f1fe61d..3a56bc360924 100644
--- a/drivers/watchdog/pc87413_wdt.c
+++ b/drivers/watchdog/pc87413_wdt.c
@@ -53,7 +53,9 @@
53#define WDTO 0x11 /* Watchdog timeout register */ 53#define WDTO 0x11 /* Watchdog timeout register */
54#define WDCFG 0x12 /* Watchdog config register */ 54#define WDCFG 0x12 /* Watchdog config register */
55 55
56static int io = 0x2E; /* Address used on Portwell Boards */ 56#define IO_DEFAULT 0x2E /* Address used on Portwell Boards */
57
58static int io = IO_DEFAULT;
57 59
58static int timeout = DEFAULT_TIMEOUT; /* timeout value */ 60static int timeout = DEFAULT_TIMEOUT; /* timeout value */
59static unsigned long timer_enabled; /* is the timer enabled? */ 61static unsigned long timer_enabled; /* is the timer enabled? */
@@ -583,12 +585,13 @@ MODULE_LICENSE("GPL");
583MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 585MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
584 586
585module_param(io, int, 0); 587module_param(io, int, 0);
586MODULE_PARM_DESC(io, MODNAME " I/O port (default: " __MODULE_STRING(io) ")."); 588MODULE_PARM_DESC(io, MODNAME " I/O port (default: "
589 __MODULE_STRING(IO_DEFAULT) ").");
587 590
588module_param(timeout, int, 0); 591module_param(timeout, int, 0);
589MODULE_PARM_DESC(timeout, 592MODULE_PARM_DESC(timeout,
590 "Watchdog timeout in minutes (default=" 593 "Watchdog timeout in minutes (default="
591 __MODULE_STRING(timeout) ")."); 594 __MODULE_STRING(DEFAULT_TIMEOUT) ").");
592 595
593module_param(nowayout, int, 0); 596module_param(nowayout, int, 0);
594MODULE_PARM_DESC(nowayout, 597MODULE_PARM_DESC(nowayout,
diff --git a/drivers/watchdog/pnx833x_wdt.c b/drivers/watchdog/pnx833x_wdt.c
index 09102f09e681..a7b5ad2a98bd 100644
--- a/drivers/watchdog/pnx833x_wdt.c
+++ b/drivers/watchdog/pnx833x_wdt.c
@@ -33,6 +33,8 @@
33#define PFX "pnx833x: " 33#define PFX "pnx833x: "
34#define WATCHDOG_TIMEOUT 30 /* 30 sec Maximum timeout */ 34#define WATCHDOG_TIMEOUT 30 /* 30 sec Maximum timeout */
35#define WATCHDOG_COUNT_FREQUENCY 68000000U /* Watchdog counts at 68MHZ. */ 35#define WATCHDOG_COUNT_FREQUENCY 68000000U /* Watchdog counts at 68MHZ. */
36#define PNX_WATCHDOG_TIMEOUT (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY)
37#define PNX_TIMEOUT_VALUE 2040000000U
36 38
37/** CONFIG block */ 39/** CONFIG block */
38#define PNX833X_CONFIG (0x07000U) 40#define PNX833X_CONFIG (0x07000U)
@@ -47,20 +49,21 @@
47static int pnx833x_wdt_alive; 49static int pnx833x_wdt_alive;
48 50
49/* Set default timeout in MHZ.*/ 51/* Set default timeout in MHZ.*/
50static int pnx833x_wdt_timeout = (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY); 52static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
51module_param(pnx833x_wdt_timeout, int, 0); 53module_param(pnx833x_wdt_timeout, int, 0);
52MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default=" 54MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default="
53 __MODULE_STRING(pnx833x_wdt_timeout) "(30 seconds)."); 55 __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
54 56
55static int nowayout = WATCHDOG_NOWAYOUT; 57static int nowayout = WATCHDOG_NOWAYOUT;
56module_param(nowayout, int, 0); 58module_param(nowayout, int, 0);
57MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 59MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
58 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 60 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
59 61
60static int start_enabled = 1; 62#define START_DEFAULT 1
63static int start_enabled = START_DEFAULT;
61module_param(start_enabled, int, 0); 64module_param(start_enabled, int, 0);
62MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion " 65MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion "
63 "(default=" __MODULE_STRING(start_enabled) ")"); 66 "(default=" __MODULE_STRING(START_DEFAULT) ")");
64 67
65static void pnx833x_wdt_start(void) 68static void pnx833x_wdt_start(void)
66{ 69{
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index e4cebef55177..095cbf38eb5d 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -63,7 +63,7 @@ module_param(nowayout, int, 0);
63module_param(soft_noboot, int, 0); 63module_param(soft_noboot, int, 0);
64module_param(debug, int, 0); 64module_param(debug, int, 0);
65 65
66MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" 66MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. (default="
67 __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); 67 __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")");
68MODULE_PARM_DESC(tmr_atboot, 68MODULE_PARM_DESC(tmr_atboot,
69 "Watchdog is started at boot time if set to 1, default=" 69 "Watchdog is started at boot time if set to 1, default="
@@ -71,8 +71,8 @@ MODULE_PARM_DESC(tmr_atboot,
71MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 71MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
72 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 72 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
73MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, " 73MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, "
74 "0 to reboot (default depends on ONLY_TESTING)"); 74 "0 to reboot (default 0)");
75MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); 75MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug (default 0)");
76 76
77static unsigned long open_lock; 77static unsigned long open_lock;
78static struct device *wdt_dev; /* platform device attached to */ 78static struct device *wdt_dev; /* platform device attached to */
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index a03f84e5ee1f..6fc74065abee 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -496,7 +496,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
496module_param(clock_division_ratio, int, 0); 496module_param(clock_division_ratio, int, 0);
497MODULE_PARM_DESC(clock_division_ratio, 497MODULE_PARM_DESC(clock_division_ratio,
498 "Clock division ratio. Valid ranges are from 0x5 (1.31ms) " 498 "Clock division ratio. Valid ranges are from 0x5 (1.31ms) "
499 "to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")"); 499 "to 0x7 (5.25ms). (default=" __MODULE_STRING(WTCSR_CKS_4096) ")");
500 500
501module_param(heartbeat, int, 0); 501module_param(heartbeat, int, 0);
502MODULE_PARM_DESC(heartbeat, 502MODULE_PARM_DESC(heartbeat,
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index 90ef70eb47d7..5c2521fc836c 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -63,7 +63,7 @@ static char expect_close;
63static DEFINE_SPINLOCK(spinlock); 63static DEFINE_SPINLOCK(spinlock);
64 64
65module_param(timeout, int, 0); 65module_param(timeout, int, 0);
66MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300), default=" 66MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300, default="
67 __MODULE_STRING(DEFAULT_TIMEOUT) ")"); 67 __MODULE_STRING(DEFAULT_TIMEOUT) ")");
68module_param(testmode, int, 0); 68module_param(testmode, int, 0);
69MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); 69MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0");