Skip to content

Commit f616e70

Browse files
Chen Nitiwai
authored andcommitted
ALSA: scarlett2: Use USB API functions rather than constants
Use the function usb_endpoint_num() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Chen Ni <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6f0ee1d commit f616e70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/usb/mixer_scarlett2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8574,8 +8574,7 @@ static int scarlett2_find_fc_interface(struct usb_device *dev,
85748574

85758575
epd = get_endpoint(intf->altsetting, 0);
85768576
private->bInterfaceNumber = desc->bInterfaceNumber;
8577-
private->bEndpointAddress = epd->bEndpointAddress &
8578-
USB_ENDPOINT_NUMBER_MASK;
8577+
private->bEndpointAddress = usb_endpoint_num(epd);
85798578
private->wMaxPacketSize = le16_to_cpu(epd->wMaxPacketSize);
85808579
private->bInterval = epd->bInterval;
85818580
return 0;

0 commit comments

Comments
 (0)