[PATCH 2/6] scsi/hpsa: Use module_pci_driver to register driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux