diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2012-03-13 04:06:12 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 14:08:48 -0400 |
commit | 697b41e4d4b20b8d8564f5501927b0ed07153990 (patch) | |
tree | b25c5e187bdb5407cdcc7afee34968599d70148f /drivers/watchdog | |
parent | 3e0113a896803f792ffdf19b016578420824573f (diff) |
watchdog: ep93xx_wdt.c: fix platform probe
Fix the device/driver init so that the misc_register
happens as last (since this opens userspace access to
the device).
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/ep93xx_wdt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 35c49da30b42..bd01bde27c4a 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c | |||
@@ -224,21 +224,21 @@ static int __devinit ep93xx_wdt_probe(struct platform_device *pdev) | |||
224 | if (!mmio_base) | 224 | if (!mmio_base) |
225 | return -ENXIO; | 225 | return -ENXIO; |
226 | 226 | ||
227 | err = misc_register(&ep93xx_wdt_miscdev); | ||
228 | |||
229 | val = readl(mmio_base + EP93XX_WATCHDOG); | ||
230 | boot_status = val & 0x01 ? 1 : 0; | ||
231 | |||
232 | pr_info("EP93XX watchdog, driver version " WDT_VERSION "%s\n", | ||
233 | (val & 0x08) ? " (nCS1 disable detected)" : ""); | ||
234 | |||
235 | if (timeout < 1 || timeout > 3600) { | 227 | if (timeout < 1 || timeout > 3600) { |
236 | timeout = WDT_TIMEOUT; | 228 | timeout = WDT_TIMEOUT; |
237 | pr_info("timeout value must be 1<=x<=3600, using %d\n", | 229 | pr_info("timeout value must be 1<=x<=3600, using %d\n", |
238 | timeout); | 230 | timeout); |
239 | } | 231 | } |
240 | 232 | ||
233 | val = readl(mmio_base + EP93XX_WATCHDOG); | ||
234 | boot_status = val & 0x01 ? 1 : 0; | ||
235 | |||
241 | setup_timer(&timer, ep93xx_timer_ping, 1); | 236 | setup_timer(&timer, ep93xx_timer_ping, 1); |
237 | |||
238 | err = misc_register(&ep93xx_wdt_miscdev); | ||
239 | |||
240 | pr_info("EP93XX watchdog, driver version " WDT_VERSION "%s\n", | ||
241 | (val & 0x08) ? " (nCS1 disable detected)" : ""); | ||
242 | return err; | 242 | return err; |
243 | } | 243 | } |
244 | 244 | ||