aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-10-06 16:31:13 -0400
committerTakashi Iwai <tiwai@suse.de>2013-10-07 05:22:03 -0400
commitdf23a2466a4961092625b487ead60f526e401062 (patch)
tree3da74828efa301829c66b6b13397e14df572ae16 /sound/usb/endpoint.c
parent06613f547a4f62c2201f70b24807d9edd4d733b0 (diff)
ALSA: usb-audio: rename alt_idx to altsetting
As Clemens Ladisch kindly explained: "Please note that there are two methods to identify alternate settings: the number, which is the value in bAlternateSetting, and the index, which is the index in the descriptor array. There might be some wording in the USB spec that these two values must be the same, but in reality, [insert standard rant about firmware writers], bAlternateSetting must be treated as a random ID value." This patch changes the name to express the correct usage semantics. No functional change. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 26856601422b..e25e32a8824d 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -426,9 +426,9 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
426 list_for_each_entry(ep, &chip->ep_list, list) { 426 list_for_each_entry(ep, &chip->ep_list, list) {
427 if (ep->ep_num == ep_num && 427 if (ep->ep_num == ep_num &&
428 ep->iface == alts->desc.bInterfaceNumber && 428 ep->iface == alts->desc.bInterfaceNumber &&
429 ep->alt_idx == alts->desc.bAlternateSetting) { 429 ep->altsetting == alts->desc.bAlternateSetting) {
430 snd_printdd(KERN_DEBUG "Re-using EP %x in iface %d,%d @%p\n", 430 snd_printdd(KERN_DEBUG "Re-using EP %x in iface %d,%d @%p\n",
431 ep_num, ep->iface, ep->alt_idx, ep); 431 ep_num, ep->iface, ep->altsetting, ep);
432 goto __exit_unlock; 432 goto __exit_unlock;
433 } 433 }
434 } 434 }
@@ -447,7 +447,7 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
447 ep->type = type; 447 ep->type = type;
448 ep->ep_num = ep_num; 448 ep->ep_num = ep_num;
449 ep->iface = alts->desc.bInterfaceNumber; 449 ep->iface = alts->desc.bInterfaceNumber;
450 ep->alt_idx = alts->desc.bAlternateSetting; 450 ep->altsetting = alts->desc.bAlternateSetting;
451 INIT_LIST_HEAD(&ep->ready_playback_urbs); 451 INIT_LIST_HEAD(&ep->ready_playback_urbs);
452 ep_num &= USB_ENDPOINT_NUMBER_MASK; 452 ep_num &= USB_ENDPOINT_NUMBER_MASK;
453 453