[PATCH] w1: matrox: Use module_pci_driver()

From: Rajat Jain
Date: Wed Jul 08 2015 - 02:08:00 EST


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.

Signed-off-by: Rajat Jain <rajatja@xxxxxxxxxx>
Signed-off-by: Rajat Jain <rajatxjain@xxxxxxxxx>
---
drivers/w1/masters/matrox_w1.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index d8667b0..7a979ba 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -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);
--
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/