Skip to content

Commit 1c116e5

Browse files
Chen Nitiwai
authored andcommitted
ALSA: usb: fcp: 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/20250516070938.12520-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent f616e70 commit 1c116e5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sound/usb/fcp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,7 @@ static int fcp_find_fc_interface(struct usb_mixer_interface *mixer)
10921092

10931093
epd = get_endpoint(intf->altsetting, 0);
10941094
private->bInterfaceNumber = desc->bInterfaceNumber;
1095-
private->bEndpointAddress = epd->bEndpointAddress &
1096-
USB_ENDPOINT_NUMBER_MASK;
1095+
private->bEndpointAddress = usb_endpoint_num(epd);
10971096
private->wMaxPacketSize = le16_to_cpu(epd->wMaxPacketSize);
10981097
private->bInterval = epd->bInterval;
10991098
return 0;

0 commit comments

Comments
 (0)