Skip to contentSkip to conversation

drivers/ptp/ptp_pch: Convert to module_pci_driver

PATCH Applied Libo Chen 1 participant 1 message May 27, 2013

Subsystems (3)
lore
Share & tools
lore

Libo Chen

author
#0 lore raw

PATCH 11/24 drivers/ptp/ptp_pch: Convert to module_pci_driver

use module_pci_driver instead of init/exit, make code clean

---
 drivers/ptp/ptp_pch.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
drivers/ptp/ptp_pch.c +1 -17
index bea9451..e63ca00 100644
@@ -705,23 +705,7 @@ static struct pci_driver pch_driver = {
 	.resume = pch_resume,
 };
 
-static void __exit ptp_pch_exit(void)
-{
-	pci_unregister_driver(&pch_driver);
-}
-
-static s32 __init ptp_pch_init(void)
-{
-	s32 ret;
-
-	/* register the driver with the pci core */
-	ret = pci_register_driver(&pch_driver);
-
-	return ret;
-}
-
-module_init(ptp_pch_init);
-module_exit(ptp_pch_exit);
+module_pci_driver(pch_driver);
 
 module_param_string(station,
 		    pch_param.station, sizeof(pch_param.station), 0444);
Signature · 1 line
1.7.1