Skip to content

Commit ca57373

Browse files
pavhofmangregkh
authored andcommitted
usb: core: config: using bit mask instead of individual bits
Using standard USB_EP_MAXP_MULT_MASK instead of individual bits for extracting multiple-transactions bits from wMaxPacketSize value. Acked-by: Alan Stern <[email protected]> Signed-off-by: Pavel Hofman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1a3910c commit ca57373

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/core/config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
422422
maxpacket_maxes = full_speed_maxpacket_maxes;
423423
break;
424424
case USB_SPEED_HIGH:
425-
/* Bits 12..11 are allowed only for HS periodic endpoints */
425+
/* Multiple-transactions bits are allowed only for HS periodic endpoints */
426426
if (usb_endpoint_xfer_int(d) || usb_endpoint_xfer_isoc(d)) {
427-
i = maxp & (BIT(12) | BIT(11));
427+
i = maxp & USB_EP_MAXP_MULT_MASK;
428428
maxp &= ~i;
429429
}
430430
fallthrough;

0 commit comments

Comments
 (0)