netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/24] drivers/ptp/ptp_pch: Convert to module_pci_driver
@ 2013-05-27  2:29 Libo Chen
  0 siblings, 0 replies; only message in thread
From: Libo Chen @ 2013-05-27  2:29 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev, linux-kernel, lizefan, libo.chen, gregkh

use module_pci_driver instead of init/exit, make code clean

Signed-off-by: Libo Chen <libo.chen@huawei.com>
---
 drivers/ptp/ptp_pch.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index bea9451..e63ca00 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-27  2:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27  2:29 [PATCH 11/24] drivers/ptp/ptp_pch: Convert to module_pci_driver Libo Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).