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-next>] [day] [month] [year] [list]
Message-Id: <1368827518-13364-1-git-send-email-peterhuewe@gmx.de>
Date:	Fri, 17 May 2013 23:51:57 +0200
From:	Peter Huewe <peterhuewe@....de>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Peter Huewe <peterhuewe@....de>, Cho Yu-Chen <acho@...e.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] staging/btmtk_usb: use module_usb_driver to register driver

Removing some boilerplate by using module_usb_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@....de>
---
 drivers/staging/btmtk_usb/btmtk_usb.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/staging/btmtk_usb/btmtk_usb.c b/drivers/staging/btmtk_usb/btmtk_usb.c
index 6b01f61..772c49e 100644
--- a/drivers/staging/btmtk_usb/btmtk_usb.c
+++ b/drivers/staging/btmtk_usb/btmtk_usb.c
@@ -1771,20 +1771,7 @@ static struct usb_driver btmtk_usb_driver = {
 	.disable_hub_initiated_lpm = 1,
 };
 
-static int __init btmtk_usb_init(void)
-{
-	BT_INFO("btmtk usb driver ver %s", VERSION);
-
-	return usb_register(&btmtk_usb_driver);
-}
-
-static void __exit btmtk_usb_exit(void)
-{
-	usb_deregister(&btmtk_usb_driver);
-}
-
-module_init(btmtk_usb_init);
-module_exit(btmtk_usb_exit);
+module_usb_driver(btmtk_usb_driver);
 
 MODULE_DESCRIPTION("Mediatek Bluetooth USB driver ver " VERSION);
 MODULE_VERSION(VERSION);
-- 
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