Commit a29c3c09 authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller

cdc_ether: trivial whitespace readability fix

This function is unreadable enough without indenting mismatches
and unnecessary line breaks.
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eeb2c4fb
...@@ -179,10 +179,8 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -179,10 +179,8 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
* probed with) and a slave/data interface; union * probed with) and a slave/data interface; union
* descriptors sort this all out. * descriptors sort this all out.
*/ */
info->control = usb_ifnum_to_if(dev->udev, info->control = usb_ifnum_to_if(dev->udev, info->u->bMasterInterface0);
info->u->bMasterInterface0); info->data = usb_ifnum_to_if(dev->udev, info->u->bSlaveInterface0);
info->data = usb_ifnum_to_if(dev->udev,
info->u->bSlaveInterface0);
if (!info->control || !info->data) { if (!info->control || !info->data) {
dev_dbg(&intf->dev, dev_dbg(&intf->dev,
"master #%u/%p slave #%u/%p\n", "master #%u/%p slave #%u/%p\n",
...@@ -216,18 +214,16 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -216,18 +214,16 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
/* a data interface altsetting does the real i/o */ /* a data interface altsetting does the real i/o */
d = &info->data->cur_altsetting->desc; d = &info->data->cur_altsetting->desc;
if (d->bInterfaceClass != USB_CLASS_CDC_DATA) { if (d->bInterfaceClass != USB_CLASS_CDC_DATA) {
dev_dbg(&intf->dev, "slave class %u\n", dev_dbg(&intf->dev, "slave class %u\n", d->bInterfaceClass);
d->bInterfaceClass);
goto bad_desc; goto bad_desc;
} }
skip: skip:
if ( rndis && if (rndis && header.usb_cdc_acm_descriptor &&
header.usb_cdc_acm_descriptor && header.usb_cdc_acm_descriptor->bmCapabilities) {
header.usb_cdc_acm_descriptor->bmCapabilities) { dev_dbg(&intf->dev,
dev_dbg(&intf->dev, "ACM capabilities %02x, not really RNDIS?\n",
"ACM capabilities %02x, not really RNDIS?\n", header.usb_cdc_acm_descriptor->bmCapabilities);
header.usb_cdc_acm_descriptor->bmCapabilities); goto bad_desc;
goto bad_desc;
} }
if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) { if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) {
...@@ -238,7 +234,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -238,7 +234,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
} }
if (header.usb_cdc_mdlm_desc && if (header.usb_cdc_mdlm_desc &&
memcmp(header.usb_cdc_mdlm_desc->bGUID, mbm_guid, 16)) { memcmp(header.usb_cdc_mdlm_desc->bGUID, mbm_guid, 16)) {
dev_dbg(&intf->dev, "GUID doesn't match\n"); dev_dbg(&intf->dev, "GUID doesn't match\n");
goto bad_desc; goto bad_desc;
} }
...@@ -302,7 +298,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) ...@@ -302,7 +298,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
if (info->control->cur_altsetting->desc.bNumEndpoints == 1) { if (info->control->cur_altsetting->desc.bNumEndpoints == 1) {
struct usb_endpoint_descriptor *desc; struct usb_endpoint_descriptor *desc;
dev->status = &info->control->cur_altsetting->endpoint [0]; dev->status = &info->control->cur_altsetting->endpoint[0];
desc = &dev->status->desc; desc = &dev->status->desc;
if (!usb_endpoint_is_int_in(desc) || if (!usb_endpoint_is_int_in(desc) ||
(le16_to_cpu(desc->wMaxPacketSize) (le16_to_cpu(desc->wMaxPacketSize)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment