]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/usb/cdc_ether.c
drivers/net: Move && and || to end of previous line
[net-next-2.6.git] / drivers / net / usb / cdc_ether.c
index 7ec24c9b253504f739724bc26dc3ab742a3c9601..de3e36596779d960e08d624c8d1dbcae941dda7e 100644 (file)
 
 static int is_rndis(struct usb_interface_descriptor *desc)
 {
-       return desc->bInterfaceClass == USB_CLASS_COMM
-               && desc->bInterfaceSubClass == 2
-               && desc->bInterfaceProtocol == 0xff;
+       return (desc->bInterfaceClass == USB_CLASS_COMM &&
+               desc->bInterfaceSubClass == 2 &&
+               desc->bInterfaceProtocol == 0xff);
 }
 
 static int is_activesync(struct usb_interface_descriptor *desc)
 {
-       return desc->bInterfaceClass == USB_CLASS_MISC
-               && desc->bInterfaceSubClass == 1
-               && desc->bInterfaceProtocol == 1;
+       return (desc->bInterfaceClass == USB_CLASS_MISC &&
+               desc->bInterfaceSubClass == 1 &&
+               desc->bInterfaceProtocol == 1);
 }
 
 static int is_wireless_rndis(struct usb_interface_descriptor *desc)
 {
-       return desc->bInterfaceClass == USB_CLASS_WIRELESS_CONTROLLER
-               && desc->bInterfaceSubClass == 1
-               && desc->bInterfaceProtocol == 3;
+       return (desc->bInterfaceClass == USB_CLASS_WIRELESS_CONTROLLER &&
+               desc->bInterfaceSubClass == 1 &&
+               desc->bInterfaceProtocol == 3);
 }
 
 #else
@@ -116,9 +116,9 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
        /* this assumes that if there's a non-RNDIS vendor variant
         * of cdc-acm, it'll fail RNDIS requests cleanly.
         */
-       rndis = is_rndis(&intf->cur_altsetting->desc)
-               || is_activesync(&intf->cur_altsetting->desc)
-               || is_wireless_rndis(&intf->cur_altsetting->desc);
+       rndis = (is_rndis(&intf->cur_altsetting->desc) ||
+                is_activesync(&intf->cur_altsetting->desc) ||
+                is_wireless_rndis(&intf->cur_altsetting->desc));
 
        memset(info, 0, sizeof *info);
        info->control = intf;
@@ -279,10 +279,10 @@ next_desc:
 
                dev->status = &info->control->cur_altsetting->endpoint [0];
                desc = &dev->status->desc;
-               if (!usb_endpoint_is_int_in(desc)
-                               || (le16_to_cpu(desc->wMaxPacketSize)
-                                       < sizeof(struct usb_cdc_notification))
-                               || !desc->bInterval) {
+               if (!usb_endpoint_is_int_in(desc) ||
+                   (le16_to_cpu(desc->wMaxPacketSize)
+                    < sizeof(struct usb_cdc_notification)) ||
+                   !desc->bInterval) {
                        dev_dbg(&intf->dev, "bad notification endpoint\n");
                        dev->status = NULL;
                }