summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/ch9200.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-09-22 09:29:49 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-22 17:34:57 -0700
commit23eedbc2435ddd226717603c4f3c8efec7bdbb4d (patch)
treed34f4e60789579e6fcd43d3060d4837415d29f20 /drivers/net/usb/ch9200.c
parentae5f2fb1d51fa128a460bcfbe3c56d7ab8bf6a43 (diff)
downloadlinux-23eedbc2435ddd226717603c4f3c8efec7bdbb4d.tar.bz2
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@distanz.ch> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/ch9200.c')
-rw-r--r--drivers/net/usb/ch9200.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c
index cabb670eb55c..5e151e6a3e09 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");