diff mbox

[scsi-next] scsi: mvumi: Using module_pci_driver.

Message ID 20180329114311.9772-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Headers show

Commit Message

Yue Haibing March 29, 2018, 11:43 a.m. UTC
Remove boilerplate code by using macro module_pci_driver.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/mvumi.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

Comments

Martin K. Petersen April 20, 2018, 11:27 p.m. UTC | #1
YueHaibing,

> Remove boilerplate code by using macro module_pci_driver.

Applied to 4.18/scsi-queue. Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index fe97401..2e6fd86 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -2693,22 +2693,4 @@  static struct pci_driver mvumi_pci_driver = {
 #endif
 };
 
-/**
- * mvumi_init - Driver load entry point
- */
-static int __init mvumi_init(void)
-{
-	return pci_register_driver(&mvumi_pci_driver);
-}
-
-/**
- * mvumi_exit - Driver unload entry point
- */
-static void __exit mvumi_exit(void)
-{
-
-	pci_unregister_driver(&mvumi_pci_driver);
-}
-
-module_init(mvumi_init);
-module_exit(mvumi_exit);
+module_pci_driver(mvumi_pci_driver);