lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369172181-22070-2-git-send-email-peterhuewe@gmx.de>
Date:	Tue, 21 May 2013 23:36:17 +0200
From:	Peter Huewe <peterhuewe@....de>
To:	"James E.J. Bottomley" <JBottomley@...allels.com>
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Peter Huewe <peterhuewe@....de>
Subject: [PATCH 2/6] scsi/hpsa: Use module_pci_driver to register driver

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ