diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2010-05-01 12:46:15 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-05-25 05:03:52 -0400 |
commit | 76550d3292ba1b0dd1ff0a13d78a2718eba599c7 (patch) | |
tree | ee6f77e3434def57114aff43b12c79673a0f22a1 /drivers/watchdog/pnx833x_wdt.c | |
parent | 42bd5d499455fe4235bb82cffe937a4089a8bba9 (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>
Diffstat (limited to 'drivers/watchdog/pnx833x_wdt.c')
-rw-r--r-- | drivers/watchdog/pnx833x_wdt.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 @@ | |||
47 | static int pnx833x_wdt_alive; | 49 | static int pnx833x_wdt_alive; |
48 | 50 | ||
49 | /* Set default timeout in MHZ.*/ | 51 | /* Set default timeout in MHZ.*/ |
50 | static int pnx833x_wdt_timeout = (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY); | 52 | static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT; |
51 | module_param(pnx833x_wdt_timeout, int, 0); | 53 | module_param(pnx833x_wdt_timeout, int, 0); |
52 | MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default=" | 54 | MODULE_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 | ||
55 | static int nowayout = WATCHDOG_NOWAYOUT; | 57 | static int nowayout = WATCHDOG_NOWAYOUT; |
56 | module_param(nowayout, int, 0); | 58 | module_param(nowayout, int, 0); |
57 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | 59 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" |
58 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 60 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
59 | 61 | ||
60 | static int start_enabled = 1; | 62 | #define START_DEFAULT 1 |
63 | static int start_enabled = START_DEFAULT; | ||
61 | module_param(start_enabled, int, 0); | 64 | module_param(start_enabled, int, 0); |
62 | MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion " | 65 | MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion " |
63 | "(default=" __MODULE_STRING(start_enabled) ")"); | 66 | "(default=" __MODULE_STRING(START_DEFAULT) ")"); |
64 | 67 | ||
65 | static void pnx833x_wdt_start(void) | 68 | static void pnx833x_wdt_start(void) |
66 | { | 69 | { |