Skip to contentSkip to conversation

staging/et131x: use module_pci_driver macro

PATCH In review Devendra Naga 1 participant 1 message Jul 10, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 staging/et131x: use module_pci_driver macro

remove code duplicating module_pci_driver
and also the obvious comments about the _init and _exit points.

---
 drivers/staging/et131x/et131x.c |   22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)
drivers/staging/et131x/et131x.c +1 -21
index 8f3fc5f..ac6897b 100644
@@ -5445,24 +5445,4 @@ static struct pci_driver et131x_driver = {
 	.driver.pm	= ET131X_PM_OPS,
 };
 
-/**
- * et131x_init_module - The "main" entry point called on driver initialization
- *
- * Returns 0 on success, errno on failure (as defined in errno.h)
- */
-static int __init et131x_init_module(void)
-{
-	return pci_register_driver(&et131x_driver);
-}
-
-/**
- * et131x_cleanup_module - The entry point called on driver cleanup
- */
-static void __exit et131x_cleanup_module(void)
-{
-	pci_unregister_driver(&et131x_driver);
-}
-
-module_init(et131x_init_module);
-module_exit(et131x_cleanup_module);
-
+module_pci_driver(et131x_driver);
Signature · 1 line
1.7.9.5