netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ch9200: Convert to use module_usb_driver
@ 2015-09-22  7:29 Tobias Klauser
  2015-09-22  7:31 ` Matthew Garrett
  2015-09-23  0:35 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Klauser @ 2015-09-22  7:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: Matthew Garrett, netdev, linux-usb

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-23  0:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22  7:29 [PATCH] ch9200: Convert to use module_usb_driver Tobias Klauser
2015-09-22  7:31 ` Matthew Garrett
2015-09-23  0:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).