diff options
author | Bjørn Mork <bjorn@mork.no> | 2019-01-05 08:32:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-07 11:33:18 -0500 |
commit | a29c3c09bad18ac2c91dfdbcc892a7a37e407227 (patch) | |
tree | 9c792e8b36c6bd253b29bae2f0023c6ab9e6aeb2 | |
parent | eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5 (diff) |
cdc_ether: trivial whitespace readability fix
This function is unreadable enough without indenting mismatches
and unnecessary line breaks.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index b3b3c05903a1..3305f23793c7 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -179,10 +179,8 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
179 | * probed with) and a slave/data interface; union | 179 | * probed with) and a slave/data interface; union |
180 | * descriptors sort this all out. | 180 | * descriptors sort this all out. |
181 | */ | 181 | */ |
182 | info->control = usb_ifnum_to_if(dev->udev, | 182 | info->control = usb_ifnum_to_if(dev->udev, info->u->bMasterInterface0); |
183 | info->u->bMasterInterface0); | 183 | info->data = usb_ifnum_to_if(dev->udev, info->u->bSlaveInterface0); |
184 | info->data = usb_ifnum_to_if(dev->udev, | ||
185 | info->u->bSlaveInterface0); | ||
186 | if (!info->control || !info->data) { | 184 | if (!info->control || !info->data) { |
187 | dev_dbg(&intf->dev, | 185 | dev_dbg(&intf->dev, |
188 | "master #%u/%p slave #%u/%p\n", | 186 | "master #%u/%p slave #%u/%p\n", |
@@ -216,18 +214,16 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
216 | /* a data interface altsetting does the real i/o */ | 214 | /* a data interface altsetting does the real i/o */ |
217 | d = &info->data->cur_altsetting->desc; | 215 | d = &info->data->cur_altsetting->desc; |
218 | if (d->bInterfaceClass != USB_CLASS_CDC_DATA) { | 216 | if (d->bInterfaceClass != USB_CLASS_CDC_DATA) { |
219 | dev_dbg(&intf->dev, "slave class %u\n", | 217 | dev_dbg(&intf->dev, "slave class %u\n", d->bInterfaceClass); |
220 | d->bInterfaceClass); | ||
221 | goto bad_desc; | 218 | goto bad_desc; |
222 | } | 219 | } |
223 | skip: | 220 | skip: |
224 | if ( rndis && | 221 | if (rndis && header.usb_cdc_acm_descriptor && |
225 | header.usb_cdc_acm_descriptor && | 222 | header.usb_cdc_acm_descriptor->bmCapabilities) { |
226 | header.usb_cdc_acm_descriptor->bmCapabilities) { | 223 | dev_dbg(&intf->dev, |
227 | dev_dbg(&intf->dev, | 224 | "ACM capabilities %02x, not really RNDIS?\n", |
228 | "ACM capabilities %02x, not really RNDIS?\n", | 225 | header.usb_cdc_acm_descriptor->bmCapabilities); |
229 | header.usb_cdc_acm_descriptor->bmCapabilities); | 226 | goto bad_desc; |
230 | goto bad_desc; | ||
231 | } | 227 | } |
232 | 228 | ||
233 | if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) { | 229 | if (header.usb_cdc_ether_desc && info->ether->wMaxSegmentSize) { |
@@ -238,7 +234,7 @@ skip: | |||
238 | } | 234 | } |
239 | 235 | ||
240 | if (header.usb_cdc_mdlm_desc && | 236 | if (header.usb_cdc_mdlm_desc && |
241 | memcmp(header.usb_cdc_mdlm_desc->bGUID, mbm_guid, 16)) { | 237 | memcmp(header.usb_cdc_mdlm_desc->bGUID, mbm_guid, 16)) { |
242 | dev_dbg(&intf->dev, "GUID doesn't match\n"); | 238 | dev_dbg(&intf->dev, "GUID doesn't match\n"); |
243 | goto bad_desc; | 239 | goto bad_desc; |
244 | } | 240 | } |
@@ -302,7 +298,7 @@ skip: | |||
302 | if (info->control->cur_altsetting->desc.bNumEndpoints == 1) { | 298 | if (info->control->cur_altsetting->desc.bNumEndpoints == 1) { |
303 | struct usb_endpoint_descriptor *desc; | 299 | struct usb_endpoint_descriptor *desc; |
304 | 300 | ||
305 | dev->status = &info->control->cur_altsetting->endpoint [0]; | 301 | dev->status = &info->control->cur_altsetting->endpoint[0]; |
306 | desc = &dev->status->desc; | 302 | desc = &dev->status->desc; |
307 | if (!usb_endpoint_is_int_in(desc) || | 303 | if (!usb_endpoint_is_int_in(desc) || |
308 | (le16_to_cpu(desc->wMaxPacketSize) | 304 | (le16_to_cpu(desc->wMaxPacketSize) |