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 <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250516070416.12458-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 6f0ee1d commit f616e70

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)