lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] scsi/hpsa: Use module_pci_driver to register driver
Date
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
drivers/scsi/hpsa.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 7f4f790..0e2d91b 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -5176,15 +5176,4 @@ clean_up:
* This is it. Register the PCI driver information for the cards we control
* the OS will call our registered routines when it finds one of our cards.
*/
-static int __init hpsa_init(void)
-{
- return pci_register_driver(&hpsa_pci_driver);
-}
-
-static void __exit hpsa_cleanup(void)
-{
- pci_unregister_driver(&hpsa_pci_driver);
-}
-
-module_init(hpsa_init);
-module_exit(hpsa_cleanup);
+module_pci_driver(hpsa_pci_driver);
--
1.8.1.5


\
 
 \ /
  Last update: 2013-05-22 00:21    [W:0.032 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site