diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2012-05-04 08:43:25 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-23 10:23:53 -0400 |
commit | 5ce9c371c788638890980b27f0cd8af7071b3a50 (patch) | |
tree | 948f891f9211d61631199bdefb2d8adb44f951f4 /drivers/watchdog/wdt_pci.c | |
parent | 8f90a3ae8f67a6c521e2d8fcb488262833f2a4cd (diff) |
watchdog: Use module_pci_driver
This patch converts the PCI watchdog drivers so that they use the
module_pci_driver() macro. This makes the code smaller and simpler.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Thomas Mingarelli <thomas.mingarelli@hp.com>
Cc: Marc Vertes <marc.vertes@sigfox.com>
Diffstat (limited to 'drivers/watchdog/wdt_pci.c')
-rw-r--r-- | drivers/watchdog/wdt_pci.c | 34 |
1 files changed, 1 insertions, 33 deletions
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"); |