summaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-21 08:30:48 +0100
committerTakashi Iwai <tiwai@suse.de>2012-11-21 11:43:56 +0100
commitb2eb950de2f09435d5156f4dc6d5dbf284cd97f3 (patch)
tree7d5724114c4f57503502a7dd4a86bc9573774669 /sound/usb/endpoint.c
parentccc1696d527d64deb417bfa1ef9e479d10ad4f6b (diff)
downloadlinux-b2eb950de2f09435d5156f4dc6d5dbf284cd97f3.tar.bz2
ALSA: usb-audio: stop both data and sync endpoints asynchronously
As we are stopping the endpoints asynchronously now, it's better to trigger the stop of both data and sync endpoints and wait for pending stopping operations, instead of the sequential trigger-and-wait procedure. So the wait argument in snd_usb_endpoint_stop() is dropped, and it's expected that the caller synchronizes explicitly by calling snd_usb_endpoint_sync_pending_stop(). (Actually there is only one place calling this, so it was safe to change.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 6db2143350d3..f487d26f8d40 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -896,8 +896,11 @@ __error:
* actually be deactivated.
*
* Must be balanced to calls of snd_usb_endpoint_start().
+ *
+ * The caller needs to synchronize the pending stop operation via
+ * snd_usb_endpoint_sync_pending_stop().
*/
-void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, bool wait)
+void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep)
{
if (!ep)
return;
@@ -911,11 +914,7 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, bool wait)
ep->sync_slave = NULL;
ep->retire_data_urb = NULL;
ep->prepare_data_urb = NULL;
-
- if (wait)
- wait_clear_urbs(ep);
- else
- set_bit(EP_FLAG_STOPPING, &ep->flags);
+ set_bit(EP_FLAG_STOPPING, &ep->flags);
}
}