aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/mpc8xxx_wdt.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-14 11:26:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-14 11:26:53 -0400
commitf81b691a3df09806385ea413c3a2ee094c705ca3 (patch)
tree01c0d6d319fcbddc98171d06cfe8e742cd270455 /drivers/watchdog/mpc8xxx_wdt.c
parent110e0358e7dfd9cc56d47077068f3680dae10b56 (diff)
parentadee14b2e1557d0a8559f29681732d05a89dfc35 (diff)
Merge commit 'v2.6.27-rc6' into x86/pat
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 f2094960e662..38c588ee694f 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type {
48}; 48};
49 49
50static struct mpc8xxx_wdt __iomem *wd_base; 50static struct mpc8xxx_wdt __iomem *wd_base;
51static int mpc8xxx_wdt_init_late(void);
51 52
52static u16 timeout = 0xffff; 53static u16 timeout = 0xffff;
53module_param(timeout, ushort, 0); 54module_param(timeout, ushort, 0);
@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
213 else 214 else
214 timeout_sec = timeout / freq; 215 timeout_sec = timeout / freq;
215 216
217#ifdef MODULE
218 ret = mpc8xxx_wdt_init_late();
219 if (ret)
220 goto err_unmap;
221#endif
222
216 pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " 223 pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d "
217 "(%d seconds)\n", reset ? "reset" : "interrupt", timeout, 224 "(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
218 timeout_sec); 225 timeout_sec);
@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {
280 * very early to start pinging the watchdog (misc devices are not yet 287 * very early to start pinging the watchdog (misc devices are not yet
281 * available), and later module_init() just registers the misc device. 288 * available), and later module_init() just registers the misc device.
282 */ 289 */
283static int __init mpc8xxx_wdt_init_late(void) 290static int mpc8xxx_wdt_init_late(void)
284{ 291{
285 int ret; 292 int ret;
286 293
@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void)
295 } 302 }
296 return 0; 303 return 0;
297} 304}
305#ifndef MODULE
298module_init(mpc8xxx_wdt_init_late); 306module_init(mpc8xxx_wdt_init_late);
307#endif
299 308
300static int __init mpc8xxx_wdt_init(void) 309static int __init mpc8xxx_wdt_init(void)
301{ 310{