Patchwork [07/24] drivers/ide/delkin_cb: Convert to module_pci_driver

login
register
mail settings
Submitter Libo Chen
Date May 27, 2013, 2:28 a.m.
Message ID <1369621726-13828-1-git-send-email-libo.chen@huawei.com>
Download mbox | patch
Permalink /patch/246496/
State Accepted
Delegated to: David Miller
Headers show

Comments

Libo Chen - May 27, 2013, 2:28 a.m.
use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
---
 drivers/ide/delkin_cb.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

Patch

diff --git a/drivers/ide/delkin_cb.c b/drivers/ide/delkin_cb.c
index 7e27d32..300daab 100644
--- a/drivers/ide/delkin_cb.c
+++ b/drivers/ide/delkin_cb.c
@@ -173,18 +173,7 @@  static struct pci_driver delkin_cb_pci_driver = {
 	.resume		= delkin_cb_resume,
 };
 
-static int __init delkin_cb_init(void)
-{
-	return pci_register_driver(&delkin_cb_pci_driver);
-}
-
-static void __exit delkin_cb_exit(void)
-{
-	pci_unregister_driver(&delkin_cb_pci_driver);
-}
-
-module_init(delkin_cb_init);
-module_exit(delkin_cb_exit);
+module_pci_driver(delkin_cb_pci_driver);
 
 MODULE_AUTHOR("Mark Lord");
 MODULE_DESCRIPTION("Basic support for Delkin/ASKA/Workbit Cardbus IDE");