diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2013-10-06 16:31:07 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-07 04:52:13 -0400 |
commit | 26de5d0a8df0817a58422f6ad43019c47716ce1f (patch) | |
tree | 88dbe768ba5be50cc89f414188d6edf793956e1d /sound/usb/pcm.c | |
parent | 93721039903eab4a3d406e6fb095e2598093bc9c (diff) |
ALSA: usb-audio: remove deactivate_endpoints()
The only call site for deactivate_endpoints() at snd_usb_hw_free().
The return value is not checked there, as it is irrelevant if it
fails on hw_free.
This patch moves the deactivation of the endpoints directly into
snd_usb_hw_free().
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r-- | sound/usb/pcm.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 19e79953f2e3..1a9a01853688 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -282,22 +282,6 @@ static void stop_endpoints(struct snd_usb_substream *subs, bool wait) | |||
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||
285 | static int deactivate_endpoints(struct snd_usb_substream *subs) | ||
286 | { | ||
287 | int reta, retb; | ||
288 | |||
289 | reta = snd_usb_endpoint_deactivate(subs->sync_endpoint); | ||
290 | retb = snd_usb_endpoint_deactivate(subs->data_endpoint); | ||
291 | |||
292 | if (reta < 0) | ||
293 | return reta; | ||
294 | |||
295 | if (retb < 0) | ||
296 | return retb; | ||
297 | |||
298 | return 0; | ||
299 | } | ||
300 | |||
301 | static int search_roland_implicit_fb(struct usb_device *dev, int ifnum, | 285 | static int search_roland_implicit_fb(struct usb_device *dev, int ifnum, |
302 | unsigned int altsetting, | 286 | unsigned int altsetting, |
303 | struct usb_host_interface **alts, | 287 | struct usb_host_interface **alts, |
@@ -736,7 +720,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream) | |||
736 | down_read(&subs->stream->chip->shutdown_rwsem); | 720 | down_read(&subs->stream->chip->shutdown_rwsem); |
737 | if (!subs->stream->chip->shutdown) { | 721 | if (!subs->stream->chip->shutdown) { |
738 | stop_endpoints(subs, true); | 722 | stop_endpoints(subs, true); |
739 | deactivate_endpoints(subs); | 723 | snd_usb_endpoint_deactivate(subs->sync_endpoint); |
724 | snd_usb_endpoint_deactivate(subs->data_endpoint); | ||
740 | } | 725 | } |
741 | up_read(&subs->stream->chip->shutdown_rwsem); | 726 | up_read(&subs->stream->chip->shutdown_rwsem); |
742 | return snd_pcm_lib_free_vmalloc_buffer(substream); | 727 | return snd_pcm_lib_free_vmalloc_buffer(substream); |