Skip to content

Commit

Permalink
powerpc: booke_wdt: Fix build error as a module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pranith Kumar authored and Wim Van Sebroeck committed Oct 20, 2014
1 parent fca8c04 commit 62ce254
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions drivers/watchdog/booke_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* occur, and the final time the board will reset.
*/

u32 booke_wdt_enabled;
u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;

#ifdef CONFIG_PPC_FSL_BOOK3E
#define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15))
Expand All @@ -41,27 +39,10 @@ u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
#define WDTP_MASK (TCR_WP_MASK)
#endif

/* Checks wdt=x and wdt_period=xx command-line option */
notrace int __init early_parse_wdt(char *p)
{
if (p && strncmp(p, "0", 1) != 0)
booke_wdt_enabled = 1;

return 0;
}
early_param("wdt", early_parse_wdt);

int __init early_parse_wdt_period(char *p)
{
unsigned long ret;
if (p) {
if (!kstrtol(p, 0, &ret))
booke_wdt_period = ret;
}

return 0;
}
early_param("wdt_period", early_parse_wdt_period);
static bool booke_wdt_enabled;
module_param(booke_wdt_enabled, bool, 0);
static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
module_param(booke_wdt_period, int, 0);

#ifdef CONFIG_PPC_FSL_BOOK3E

Expand Down Expand Up @@ -259,5 +240,6 @@ static int __init booke_wdt_init(void)
module_init(booke_wdt_init);
module_exit(booke_wdt_exit);

MODULE_ALIAS("booke_wdt");
MODULE_DESCRIPTION("PowerPC Book-E watchdog driver");
MODULE_LICENSE("GPL");

0 comments on commit 62ce254

Please sign in to comment.