diff options
| author | Chen Ni <nichen@iscas.ac.cn> | 2025-05-16 10:09:38 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-05-16 10:57:00 +0300 |
| commit | 1c116e5569ef3bd33be1d6f687b0270c0932838d (patch) | |
| tree | 7bdb3868e5dbdb941bbcbfe734bb55e51226ef33 | |
| parent | f616e702a2093805e3d5b912c98743230f37699f (diff) | |
| download | linux-1c116e5569ef3bd33be1d6f687b0270c0932838d.tar.xz | |
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>
| -rw-r--r-- | sound/usb/fcp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c index 7df65041ace5..98f9964311a7 100644 --- a/sound/usb/fcp.c +++ b/sound/usb/fcp.c @@ -1092,8 +1092,7 @@ static int fcp_find_fc_interface(struct usb_mixer_interface *mixer) 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; |
