From 5ce9c371c788638890980b27f0cd8af7071b3a50 Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Fri, 4 May 2012 14:43:25 +0200 Subject: 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 Cc: Thomas Mingarelli Cc: Marc Vertes --- drivers/watchdog/wdt_pci.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'drivers/watchdog/wdt_pci.c') diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 1c888c7d4cc..e32654efdbb 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c @@ -739,39 +739,7 @@ static struct pci_driver wdtpci_driver = { .remove = __devexit_p(wdtpci_remove_one), }; - -/** - * wdtpci_cleanup: - * - * Unload the watchdog. You cannot do this with any file handles open. - * If your watchdog is set to continue ticking on close and you unload - * it, well it keeps ticking. We won't get the interrupt but the board - * will not touch PC memory so all is fine. You just have to load a new - * module in xx seconds or reboot. - */ - -static void __exit wdtpci_cleanup(void) -{ - pci_unregister_driver(&wdtpci_driver); -} - - -/** - * wdtpci_init: - * - * Set up the WDT watchdog board. All we have to do is grab the - * resources we require and bitch if anyone beat us to them. - * The open() function will actually kick the board off. - */ - -static int __init wdtpci_init(void) -{ - return pci_register_driver(&wdtpci_driver); -} - - -module_init(wdtpci_init); -module_exit(wdtpci_cleanup); +module_pci_driver(wdtpci_driver); MODULE_AUTHOR("JP Nollmann, Alan Cox"); MODULE_DESCRIPTION("Driver for the ICS PCI-WDT500/501 watchdog cards"); -- cgit v1.2.3-70-g09d2