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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent f616e70 commit 1c116e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)