summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/hpwdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2012-05-04 14:43:25 +0200
committerWim Van Sebroeck <wim@iguana.be>2012-05-23 16:23:53 +0200
commit5ce9c371c788638890980b27f0cd8af7071b3a50 (patch)
tree948f891f9211d61631199bdefb2d8adb44f951f4 /drivers/watchdog/hpwdt.c
parent8f90a3ae8f67a6c521e2d8fcb488262833f2a4cd (diff)
downloadblackbird-op-linux-5ce9c371c788638890980b27f0cd8af7071b3a50.tar.gz
blackbird-op-linux-5ce9c371c788638890980b27f0cd8af7071b3a50.zip
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/hpwdt.c')
-rw-r--r--drivers/watchdog/hpwdt.c13
1 files changed, 1 insertions, 12 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 = {
.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);
OpenPOWER on IntegriCloud