X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fmpc8xxx_wdt.c;h=38c588ee694f8c0333b4c7e4df5f2b3832875806;hb=b840d79631c882786925303c2b0f4fefc31845ed;hp=f2094960e66258d6bdd9e8e3a8df36a9b6c3dde8;hpb=7a49efae71397cf7e9299bbb22b2d12f7cf12428;p=linux-2.6-omap-h63xx.git 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) {