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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442906989-10664-1-git-send-email-tklauser@distanz.ch>
Date:	Tue, 22 Sep 2015 09:29:49 +0200
From:	Tobias Klauser <tklauser@...tanz.ch>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	Matthew Garrett <mjg59@...f.ucam.org>, netdev@...r.kernel.org,
	linux-usb@...r.kernel.org
Subject: [PATCH] ch9200: Convert to use module_usb_driver

Converts the ch9200 driver to use the module_usb_driver() macro which
makes the code smaller and a bit simpler.

Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
---
 drivers/net/usb/ch9200.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c
index cabb670..5e151e6 100644
--- a/drivers/net/usb/ch9200.c
+++ b/drivers/net/usb/ch9200.c
@@ -426,18 +426,7 @@ static struct usb_driver ch9200_driver = {
 	.resume = usbnet_resume,
 };
 
-static int __init ch9200_init(void)
-{
-	return usb_register(&ch9200_driver);
-}
-
-static void __exit ch9200_exit(void)
-{
-	usb_deregister(&ch9200_driver);
-}
-
-module_init(ch9200_init);
-module_exit(ch9200_exit);
+module_usb_driver(ch9200_driver);
 
 MODULE_DESCRIPTION("QinHeng CH9200 USB Network device");
 MODULE_LICENSE("GPL");
-- 
2.5.0


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ