]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/net/cdc_ether.c
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / drivers / usb / net / cdc_ether.c
index efd195b5912c6bdab30a27f2fa86158a2a9d1ab2..44a91547146e21958df2196ea174a7a90413a395 100644 (file)
@@ -20,7 +20,6 @@
 // #define     DEBUG                   // error path messages, extra info
 // #define     VERBOSE                 // more; success messages
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init.h>
@@ -201,8 +200,7 @@ next_desc:
 
                dev->status = &info->control->cur_altsetting->endpoint [0];
                desc = &dev->status->desc;
-               if (desc->bmAttributes != USB_ENDPOINT_XFER_INT
-                               || !(desc->bEndpointAddress & USB_DIR_IN)
+               if (!usb_endpoint_is_int_in(desc)
                                || (le16_to_cpu(desc->wMaxPacketSize)
                                        < sizeof(struct usb_cdc_notification))
                                || !desc->bInterval) {
@@ -499,7 +497,7 @@ static struct usb_driver cdc_driver = {
 
 static int __init cdc_init(void)
 {
-       BUG_ON((sizeof(((struct usbnet *)0)->data)
+       BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data)
                        < sizeof(struct cdc_state)));
 
        return usb_register(&cdc_driver);