diff options
author | Joe Perches <joe@perches.com> | 2009-12-03 02:58:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 16:18:01 -0500 |
commit | 8e95a2026f3b43f7c3d676adaccd2de9532e8dcc (patch) | |
tree | 3733318168cd512480b6db58c5c16d1c8847f0b7 /drivers/net/usb/cdc_ether.c | |
parent | 3454f835837609d60b29a266e3bd9d701073b060 (diff) |
drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.
Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)
Added a few > 80 column lines, which I ignored.
Existing checkpatch complaints ignored.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ether.c')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 7ec24c9b2535..de3e36596779 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -37,23 +37,23 @@ | |||
37 | 37 | ||
38 | static int is_rndis(struct usb_interface_descriptor *desc) | 38 | static int is_rndis(struct usb_interface_descriptor *desc) |
39 | { | 39 | { |
40 | return desc->bInterfaceClass == USB_CLASS_COMM | 40 | return (desc->bInterfaceClass == USB_CLASS_COMM && |
41 | && desc->bInterfaceSubClass == 2 | 41 | desc->bInterfaceSubClass == 2 && |
42 | && desc->bInterfaceProtocol == 0xff; | 42 | desc->bInterfaceProtocol == 0xff); |
43 | } | 43 | } |
44 | 44 | ||
45 | static int is_activesync(struct usb_interface_descriptor *desc) | 45 | static int is_activesync(struct usb_interface_descriptor *desc) |
46 | { | 46 | { |
47 | return desc->bInterfaceClass == USB_CLASS_MISC | 47 | return (desc->bInterfaceClass == USB_CLASS_MISC && |
48 | && desc->bInterfaceSubClass == 1 | 48 | desc->bInterfaceSubClass == 1 && |
49 | && desc->bInterfaceProtocol == 1; | 49 | desc->bInterfaceProtocol == 1); |
50 | } | 50 | } |
51 | 51 | ||
52 | static int is_wireless_rndis(struct usb_interface_descriptor *desc) | 52 | static int is_wireless_rndis(struct usb_interface_descriptor *desc) |
53 | { | 53 | { |
54 | return desc->bInterfaceClass == USB_CLASS_WIRELESS_CONTROLLER | 54 | return (desc->bInterfaceClass == USB_CLASS_WIRELESS_CONTROLLER && |
55 | && desc->bInterfaceSubClass == 1 | 55 | desc->bInterfaceSubClass == 1 && |
56 | && desc->bInterfaceProtocol == 3; | 56 | desc->bInterfaceProtocol == 3); |
57 | } | 57 | } |
58 | 58 | ||
59 | #else | 59 | #else |
@@ -116,9 +116,9 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
116 | /* this assumes that if there's a non-RNDIS vendor variant | 116 | /* this assumes that if there's a non-RNDIS vendor variant |
117 | * of cdc-acm, it'll fail RNDIS requests cleanly. | 117 | * of cdc-acm, it'll fail RNDIS requests cleanly. |
118 | */ | 118 | */ |
119 | rndis = is_rndis(&intf->cur_altsetting->desc) | 119 | rndis = (is_rndis(&intf->cur_altsetting->desc) || |
120 | || is_activesync(&intf->cur_altsetting->desc) | 120 | is_activesync(&intf->cur_altsetting->desc) || |
121 | || is_wireless_rndis(&intf->cur_altsetting->desc); | 121 | is_wireless_rndis(&intf->cur_altsetting->desc)); |
122 | 122 | ||
123 | memset(info, 0, sizeof *info); | 123 | memset(info, 0, sizeof *info); |
124 | info->control = intf; | 124 | info->control = intf; |
@@ -279,10 +279,10 @@ next_desc: | |||
279 | 279 | ||
280 | dev->status = &info->control->cur_altsetting->endpoint [0]; | 280 | dev->status = &info->control->cur_altsetting->endpoint [0]; |
281 | desc = &dev->status->desc; | 281 | desc = &dev->status->desc; |
282 | if (!usb_endpoint_is_int_in(desc) | 282 | if (!usb_endpoint_is_int_in(desc) || |
283 | || (le16_to_cpu(desc->wMaxPacketSize) | 283 | (le16_to_cpu(desc->wMaxPacketSize) |
284 | < sizeof(struct usb_cdc_notification)) | 284 | < sizeof(struct usb_cdc_notification)) || |
285 | || !desc->bInterval) { | 285 | !desc->bInterval) { |
286 | dev_dbg(&intf->dev, "bad notification endpoint\n"); | 286 | dev_dbg(&intf->dev, "bad notification endpoint\n"); |
287 | dev->status = NULL; | 287 | dev->status = NULL; |
288 | } | 288 | } |