Skip to content

Commit

Permalink
ALSA: usb-audio: don't deactivate URBs on in-use EP
Browse files Browse the repository at this point in the history
If an endpoint in use, its associated URBs should not be
deactivated.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eldad Zack authored and Takashi Iwai committed Oct 7, 2013
1 parent 26de5d0 commit 239b9f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/usb/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,12 +959,12 @@ int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep)
if (!ep)
return -EINVAL;

deactivate_urbs(ep, true);
wait_clear_urbs(ep);

if (ep->use_count != 0)
return 0;

deactivate_urbs(ep, true);
wait_clear_urbs(ep);

clear_bit(EP_FLAG_ACTIVATED, &ep->flags);

return 0;
Expand Down

0 comments on commit 239b9f7

Please sign in to comment.