diff options
-rw-r--r-- | drivers/watchdog/hpwdt.c | 13 | ||||
-rw-r--r-- | drivers/watchdog/i6300esb.c | 14 | ||||
-rw-r--r-- | drivers/watchdog/pcwd_pci.c | 18 | ||||
-rw-r--r-- | drivers/watchdog/via_wdt.c | 18 | ||||
-rw-r--r-- | drivers/watchdog/wdt_pci.c | 34 |
5 files changed, 9 insertions, 88 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 23885f2d56a0..2b763815aeec 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -861,16 +861,6 @@ static struct pci_driver hpwdt_driver = { | |||
861 | .remove = __devexit_p(hpwdt_exit), | 861 | .remove = __devexit_p(hpwdt_exit), |
862 | }; | 862 | }; |
863 | 863 | ||
864 | static void __exit hpwdt_cleanup(void) | ||
865 | { | ||
866 | pci_unregister_driver(&hpwdt_driver); | ||
867 | } | ||
868 | |||
869 | static int __init hpwdt_init(void) | ||
870 | { | ||
871 | return pci_register_driver(&hpwdt_driver); | ||
872 | } | ||
873 | |||
874 | MODULE_AUTHOR("Tom Mingarelli"); | 864 | MODULE_AUTHOR("Tom Mingarelli"); |
875 | MODULE_DESCRIPTION("hp watchdog driver"); | 865 | MODULE_DESCRIPTION("hp watchdog driver"); |
876 | MODULE_LICENSE("GPL"); | 866 | MODULE_LICENSE("GPL"); |
@@ -889,5 +879,4 @@ module_param(allow_kdump, int, 0); | |||
889 | MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); | 879 | MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); |
890 | #endif /* !CONFIG_HPWDT_NMI_DECODING */ | 880 | #endif /* !CONFIG_HPWDT_NMI_DECODING */ |
891 | 881 | ||
892 | module_init(hpwdt_init); | 882 | module_pci_driver(hpwdt_driver); |
893 | module_exit(hpwdt_cleanup); | ||
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index 738032a36bcf..276877d5b6a3 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c | |||
@@ -492,19 +492,7 @@ static struct pci_driver esb_driver = { | |||
492 | .shutdown = esb_shutdown, | 492 | .shutdown = esb_shutdown, |
493 | }; | 493 | }; |
494 | 494 | ||
495 | static int __init watchdog_init(void) | 495 | module_pci_driver(esb_driver); |
496 | { | ||
497 | return pci_register_driver(&esb_driver); | ||
498 | } | ||
499 | |||
500 | static void __exit watchdog_cleanup(void) | ||
501 | { | ||
502 | pci_unregister_driver(&esb_driver); | ||
503 | pr_info("Watchdog Module Unloaded\n"); | ||
504 | } | ||
505 | |||
506 | module_init(watchdog_init); | ||
507 | module_exit(watchdog_cleanup); | ||
508 | 496 | ||
509 | MODULE_AUTHOR("Ross Biro and David Härdeman"); | 497 | MODULE_AUTHOR("Ross Biro and David Härdeman"); |
510 | MODULE_DESCRIPTION("Watchdog driver for Intel 6300ESB chipsets"); | 498 | MODULE_DESCRIPTION("Watchdog driver for Intel 6300ESB chipsets"); |
diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c index c891399bed6a..ee6900da8678 100644 --- a/drivers/watchdog/pcwd_pci.c +++ b/drivers/watchdog/pcwd_pci.c | |||
@@ -707,6 +707,7 @@ static int __devinit pcipcwd_card_init(struct pci_dev *pdev, | |||
707 | goto err_out_disable_device; | 707 | goto err_out_disable_device; |
708 | } | 708 | } |
709 | 709 | ||
710 | spin_lock_init(&pcipcwd_private.io_lock); | ||
710 | pcipcwd_private.pdev = pdev; | 711 | pcipcwd_private.pdev = pdev; |
711 | pcipcwd_private.io_addr = pci_resource_start(pdev, 0); | 712 | pcipcwd_private.io_addr = pci_resource_start(pdev, 0); |
712 | 713 | ||
@@ -814,22 +815,7 @@ static struct pci_driver pcipcwd_driver = { | |||
814 | .remove = __devexit_p(pcipcwd_card_exit), | 815 | .remove = __devexit_p(pcipcwd_card_exit), |
815 | }; | 816 | }; |
816 | 817 | ||
817 | static int __init pcipcwd_init_module(void) | 818 | module_pci_driver(pcipcwd_driver); |
818 | { | ||
819 | spin_lock_init(&pcipcwd_private.io_lock); | ||
820 | |||
821 | return pci_register_driver(&pcipcwd_driver); | ||
822 | } | ||
823 | |||
824 | static void __exit pcipcwd_cleanup_module(void) | ||
825 | { | ||
826 | pci_unregister_driver(&pcipcwd_driver); | ||
827 | |||
828 | pr_info("Watchdog Module Unloaded\n"); | ||
829 | } | ||
830 | |||
831 | module_init(pcipcwd_init_module); | ||
832 | module_exit(pcipcwd_cleanup_module); | ||
833 | 819 | ||
834 | MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>"); | 820 | MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>"); |
835 | MODULE_DESCRIPTION("Berkshire PCI-PC Watchdog driver"); | 821 | MODULE_DESCRIPTION("Berkshire PCI-PC Watchdog driver"); |
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"); |
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 1c888c7d4cce..e32654efdbb6 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c | |||
@@ -739,39 +739,7 @@ static struct pci_driver wdtpci_driver = { | |||
739 | .remove = __devexit_p(wdtpci_remove_one), | 739 | .remove = __devexit_p(wdtpci_remove_one), |
740 | }; | 740 | }; |
741 | 741 | ||
742 | 742 | module_pci_driver(wdtpci_driver); | |
743 | /** | ||
744 | * wdtpci_cleanup: | ||
745 | * | ||
746 | * Unload the watchdog. You cannot do this with any file handles open. | ||
747 | * If your watchdog is set to continue ticking on close and you unload | ||
748 | * it, well it keeps ticking. We won't get the interrupt but the board | ||
749 | * will not touch PC memory so all is fine. You just have to load a new | ||
750 | * module in xx seconds or reboot. | ||
751 | */ | ||
752 | |||
753 | static void __exit wdtpci_cleanup(void) | ||
754 | { | ||
755 | pci_unregister_driver(&wdtpci_driver); | ||
756 | } | ||
757 | |||
758 | |||
759 | /** | ||
760 | * wdtpci_init: | ||
761 | * | ||
762 | * Set up the WDT watchdog board. All we have to do is grab the | ||
763 | * resources we require and bitch if anyone beat us to them. | ||
764 | * The open() function will actually kick the board off. | ||
765 | */ | ||
766 | |||
767 | static int __init wdtpci_init(void) | ||
768 | { | ||
769 | return pci_register_driver(&wdtpci_driver); | ||
770 | } | ||
771 | |||
772 | |||
773 | module_init(wdtpci_init); | ||
774 | module_exit(wdtpci_cleanup); | ||
775 | 743 | ||
776 | MODULE_AUTHOR("JP Nollmann, Alan Cox"); | 744 | MODULE_AUTHOR("JP Nollmann, Alan Cox"); |
777 | MODULE_DESCRIPTION("Driver for the ICS PCI-WDT500/501 watchdog cards"); | 745 | MODULE_DESCRIPTION("Driver for the ICS PCI-WDT500/501 watchdog cards"); |