diff options
author | Pranith Kumar <bobby.prani@gmail.com> | 2014-08-20 15:26:46 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2014-10-20 14:44:22 -0400 |
commit | 62ce25439a7ea01eba5c2a6a8284e4aa23890042 (patch) | |
tree | bcf5c408575875f39bfd73d1ba1b86f84a43debe | |
parent | fca8c0481bc8d751479ca13f454e89a7fdfece03 (diff) |
powerpc: booke_wdt: Fix build error as a module
Building booke_wdt fails when trying to build as a module as there is no
early_param() in module. Fix by using module_param() instead of early_param().
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 08a785398eac..e96b09b135c8 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -30,8 +30,6 @@ | |||
30 | * occur, and the final time the board will reset. | 30 | * occur, and the final time the board will reset. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | u32 booke_wdt_enabled; | ||
34 | u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT; | ||
35 | 33 | ||
36 | #ifdef CONFIG_PPC_FSL_BOOK3E | 34 | #ifdef CONFIG_PPC_FSL_BOOK3E |
37 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) | 35 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) |
@@ -41,27 +39,10 @@ u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT; | |||
41 | #define WDTP_MASK (TCR_WP_MASK) | 39 | #define WDTP_MASK (TCR_WP_MASK) |
42 | #endif | 40 | #endif |
43 | 41 | ||
44 | /* Checks wdt=x and wdt_period=xx command-line option */ | 42 | static bool booke_wdt_enabled; |
45 | notrace int __init early_parse_wdt(char *p) | 43 | module_param(booke_wdt_enabled, bool, 0); |
46 | { | 44 | static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT; |
47 | if (p && strncmp(p, "0", 1) != 0) | 45 | module_param(booke_wdt_period, int, 0); |
48 | booke_wdt_enabled = 1; | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | early_param("wdt", early_parse_wdt); | ||
53 | |||
54 | int __init early_parse_wdt_period(char *p) | ||
55 | { | ||
56 | unsigned long ret; | ||
57 | if (p) { | ||
58 | if (!kstrtol(p, 0, &ret)) | ||
59 | booke_wdt_period = ret; | ||
60 | } | ||
61 | |||
62 | return 0; | ||
63 | } | ||
64 | early_param("wdt_period", early_parse_wdt_period); | ||
65 | 46 | ||
66 | #ifdef CONFIG_PPC_FSL_BOOK3E | 47 | #ifdef CONFIG_PPC_FSL_BOOK3E |
67 | 48 | ||
@@ -259,5 +240,6 @@ static int __init booke_wdt_init(void) | |||
259 | module_init(booke_wdt_init); | 240 | module_init(booke_wdt_init); |
260 | module_exit(booke_wdt_exit); | 241 | module_exit(booke_wdt_exit); |
261 | 242 | ||
243 | MODULE_ALIAS("booke_wdt"); | ||
262 | MODULE_DESCRIPTION("PowerPC Book-E watchdog driver"); | 244 | MODULE_DESCRIPTION("PowerPC Book-E watchdog driver"); |
263 | MODULE_LICENSE("GPL"); | 245 | MODULE_LICENSE("GPL"); |