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/hpwdt.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/watchdog/hpwdt.c') 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 = { .remove = __devexit_p(hpwdt_exit), }; -static void __exit hpwdt_cleanup(void) -{ - pci_unregister_driver(&hpwdt_driver); -} - -static int __init hpwdt_init(void) -{ - return pci_register_driver(&hpwdt_driver); -} - MODULE_AUTHOR("Tom Mingarelli"); MODULE_DESCRIPTION("hp watchdog driver"); MODULE_LICENSE("GPL"); @@ -889,5 +879,4 @@ module_param(allow_kdump, int, 0); MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); #endif /* !CONFIG_HPWDT_NMI_DECODING */ -module_init(hpwdt_init); -module_exit(hpwdt_cleanup); +module_pci_driver(hpwdt_driver); -- cgit v1.2.3-59-g8ed1b