aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/mpc8xxx_wdt.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-08-28 02:47:00 +0000
committerSteve French <sfrench@us.ibm.com>2008-08-28 02:47:00 +0000
commit6405c9cd9bf7b1c35ed76ef8ee3e217056285702 (patch)
tree0659c9ae17d1375f185f88f4f7fef1a667f375d8 /drivers/watchdog/mpc8xxx_wdt.c
parentbcc55c6664a90146149ba0fd93052adc94287b9f (diff)
parent4c246edd2550304df5b766cc841584b2bb058843 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/watchdog/mpc8xxx_wdt.c')
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index f2094960e66..38c588ee694 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type {
};
static struct mpc8xxx_wdt __iomem *wd_base;
+static int mpc8xxx_wdt_init_late(void);
static u16 timeout = 0xffff;
module_param(timeout, ushort, 0);
@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
else
timeout_sec = timeout / freq;
+#ifdef MODULE
+ ret = mpc8xxx_wdt_init_late();
+ if (ret)
+ goto err_unmap;
+#endif
+
pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d "
"(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
timeout_sec);
@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {
* very early to start pinging the watchdog (misc devices are not yet
* available), and later module_init() just registers the misc device.
*/
-static int __init mpc8xxx_wdt_init_late(void)
+static int mpc8xxx_wdt_init_late(void)
{
int ret;
@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void)
}
return 0;
}
+#ifndef MODULE
module_init(mpc8xxx_wdt_init_late);
+#endif
static int __init mpc8xxx_wdt_init(void)
{