From: Pranith Kumar <bobby.prani@gmail.com>
To: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org (open list:WATCHDOG DEVICE D...),
linux-kernel@vger.kernel.org (open list)
Cc: Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH] powerpc: booke_wdt: Fix build error as a module
Date: Wed, 20 Aug 2014 12:55:44 -0400 [thread overview]
Message-ID: <1408553745-3536-1-git-send-email-bobby.prani@gmail.com> (raw)
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>
CC: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/booke_wdt.c | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 08a7853..65f5e9f 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -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))
@@ -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 = true;
+module_param(booke_wdt_enabled, bool, 0444);
+static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
+module_param(booke_wdt_period, int, 0444);
#ifdef CONFIG_PPC_FSL_BOOK3E
@@ -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");
--
1.9.1
next reply other threads:[~2014-08-20 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 16:55 Pranith Kumar [this message]
2014-08-20 16:55 ` [PATCH] serial: Fix build failure caused by missing header file Pranith Kumar
2014-08-25 20:13 ` Greg Kroah-Hartman
2014-08-25 23:00 ` Pranith Kumar
2014-08-25 23:22 ` Greg Kroah-Hartman
2014-08-20 18:59 ` [PATCH] powerpc: booke_wdt: Fix build error as a module Guenter
2014-08-20 19:18 ` Pranith Kumar
2014-08-20 19:21 ` Pranith Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408553745-3536-1-git-send-email-bobby.prani@gmail.com \
--to=bobby.prani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox