aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-03 17:18:49 -0400
committerTakashi Iwai <tiwai@suse.de>2013-04-04 02:30:06 -0400
commit88766f04c4142c0a388a1de354616c3deafba513 (patch)
treee99293557513f294c5a703f449ca871b17be27bc /sound/usb/endpoint.c
parent7c51746517e46806c59da6d780e7a14e8ae2bf78 (diff)
ALSA: usb-audio: convert list_for_each to entry variant
Change occurances of list_for_each into list_for_each_entry where applicable. 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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 21049b882ee6..b1f687f57ba5 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -415,14 +415,12 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
415 struct usb_host_interface *alts, 415 struct usb_host_interface *alts,
416 int ep_num, int direction, int type) 416 int ep_num, int direction, int type)
417{ 417{
418 struct list_head *p;
419 struct snd_usb_endpoint *ep; 418 struct snd_usb_endpoint *ep;
420 int is_playback = direction == SNDRV_PCM_STREAM_PLAYBACK; 419 int is_playback = direction == SNDRV_PCM_STREAM_PLAYBACK;
421 420
422 mutex_lock(&chip->mutex); 421 mutex_lock(&chip->mutex);
423 422
424 list_for_each(p, &chip->ep_list) { 423 list_for_each_entry(ep, &chip->ep_list, list) {
425 ep = list_entry(p, struct snd_usb_endpoint, list);
426 if (ep->ep_num == ep_num && 424 if (ep->ep_num == ep_num &&
427 ep->iface == alts->desc.bInterfaceNumber && 425 ep->iface == alts->desc.bInterfaceNumber &&
428 ep->alt_idx == alts->desc.bAlternateSetting) { 426 ep->alt_idx == alts->desc.bAlternateSetting) {