diff options
Diffstat (limited to 'drivers/watchdog/via_wdt.c')
-rw-r--r-- | drivers/watchdog/via_wdt.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c index 465e08273c97..5603e31afdab 100644 --- a/drivers/watchdog/via_wdt.c +++ b/drivers/watchdog/via_wdt.c | |||
@@ -202,6 +202,9 @@ static int __devinit wdt_probe(struct pci_dev *pdev, | |||
202 | goto err_out_release; | 202 | goto err_out_release; |
203 | } | 203 | } |
204 | 204 | ||
205 | if (timeout < 1 || timeout > WDT_TIMEOUT_MAX) | ||
206 | timeout = WDT_TIMEOUT; | ||
207 | |||
205 | wdt_dev.timeout = timeout; | 208 | wdt_dev.timeout = timeout; |
206 | watchdog_set_nowayout(&wdt_dev, nowayout); | 209 | watchdog_set_nowayout(&wdt_dev, nowayout); |
207 | if (readl(wdt_mem) & VIA_WDT_FIRED) | 210 | if (readl(wdt_mem) & VIA_WDT_FIRED) |
@@ -250,20 +253,7 @@ static struct pci_driver wdt_driver = { | |||
250 | .remove = __devexit_p(wdt_remove), | 253 | .remove = __devexit_p(wdt_remove), |
251 | }; | 254 | }; |
252 | 255 | ||
253 | static int __init wdt_init(void) | 256 | module_pci_driver(wdt_driver); |
254 | { | ||
255 | if (timeout < 1 || timeout > WDT_TIMEOUT_MAX) | ||
256 | timeout = WDT_TIMEOUT; | ||
257 | return pci_register_driver(&wdt_driver); | ||
258 | } | ||
259 | |||
260 | static void __exit wdt_exit(void) | ||
261 | { | ||
262 | pci_unregister_driver(&wdt_driver); | ||
263 | } | ||
264 | |||
265 | module_init(wdt_init); | ||
266 | module_exit(wdt_exit); | ||
267 | 257 | ||
268 | MODULE_AUTHOR("Marc Vertes"); | 258 | MODULE_AUTHOR("Marc Vertes"); |
269 | MODULE_DESCRIPTION("Driver for watchdog timer on VIA chipset"); | 259 | MODULE_DESCRIPTION("Driver for watchdog timer on VIA chipset"); |