aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/cdc_ether.c')
-rw-r--r--drivers/net/usb/cdc_ether.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 99ed6eb4dfaf..41a61efc331e 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -425,6 +425,9 @@ int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
425 int status; 425 int status;
426 struct cdc_state *info = (void *) &dev->data; 426 struct cdc_state *info = (void *) &dev->data;
427 427
428 BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data)
429 < sizeof(struct cdc_state)));
430
428 status = usbnet_generic_cdc_bind(dev, intf); 431 status = usbnet_generic_cdc_bind(dev, intf);
429 if (status < 0) 432 if (status < 0)
430 return status; 433 return status;
@@ -615,21 +618,7 @@ static struct usb_driver cdc_driver = {
615 .supports_autosuspend = 1, 618 .supports_autosuspend = 1,
616}; 619};
617 620
618 621module_usb_driver(cdc_driver);
619static int __init cdc_init(void)
620{
621 BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data)
622 < sizeof(struct cdc_state)));
623
624 return usb_register(&cdc_driver);
625}
626module_init(cdc_init);
627
628static void __exit cdc_exit(void)
629{
630 usb_deregister(&cdc_driver);
631}
632module_exit(cdc_exit);
633 622
634MODULE_AUTHOR("David Brownell"); 623MODULE_AUTHOR("David Brownell");
635MODULE_DESCRIPTION("USB CDC Ethernet devices"); 624MODULE_DESCRIPTION("USB CDC Ethernet devices");