summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Ni <nichen@iscas.ac.cn>2025-05-16 15:04:16 +0800
committerTakashi Iwai <tiwai@suse.de>2025-05-16 09:56:46 +0200
commitf616e702a2093805e3d5b912c98743230f37699f (patch)
tree0555f5053ce6def05f1ff084674b328751e4a768
parent6f0ee1d220f5f3b31a2251f34a24656c503b58c4 (diff)
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>
-rw-r--r--sound/usb/mixer_scarlett2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index 288d22e6a0b2..93589e86828a 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -8574,8 +8574,7 @@ static int scarlett2_find_fc_interface(struct usb_device *dev,
epd = get_endpoint(intf->altsetting, 0);
private->bInterfaceNumber = desc->bInterfaceNumber;
- private->bEndpointAddress = epd->bEndpointAddress &
- USB_ENDPOINT_NUMBER_MASK;
+ private->bEndpointAddress = usb_endpoint_num(epd);
private->wMaxPacketSize = le16_to_cpu(epd->wMaxPacketSize);
private->bInterval = epd->bInterval;
return 0;