Skip to contentSkip to conversation

w1: matrox: Use module_pci_driver()

PATCH New Rajat Jain 1 participant 1 message Jul 8, 2015 W1 dallas's 1-wire bus

lore
Share & tools
lore

Rajat Jain

author
#0 lore raw

PATCH 1/1 w1: matrox: Use module_pci_driver()

Since the module_init and module_exit functions do little other than registering and registering the driver on PCI, use module_pci_driver to simplify.

---
 drivers/w1/masters/matrox_w1.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/w1/masters/matrox_w1.c +1 -12
index d8667b0..7a979ba 100644
@@ -233,15 +233,4 @@ static void matrox_w1_remove(struct pci_dev *pdev)
 	kfree(dev);
 }
 
-static int __init matrox_w1_init(void)
-{
-	return pci_register_driver(&matrox_w1_pci_driver);
-}
-
-static void __exit matrox_w1_fini(void)
-{
-	pci_unregister_driver(&matrox_w1_pci_driver);
-}
-
-module_init(matrox_w1_init);
-module_exit(matrox_w1_fini);
+module_pci_driver(matrox_w1_pci_driver);
Signature · 1 line
2.4.3.573.g4eafbef