summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2017-05-03 06:58:12 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2017-05-03 06:58:12 +0000
commit1379a76e13b4827939c41e7d3c282375897e277b (patch)
treed05e37d71f7052de9013139c1668abf5e6f8c54a /sys/dev
parentab178bfb5130263e8c0f495f6189b6be6a3da690 (diff)
Remove unused (and wrong) uaudio_drain() call. From Michael W.
Bombardieri" <mb@ii.net>.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uaudio.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 316646bb66c..863a106cf56 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.126 2017/04/08 02:57:25 deraadt Exp $ */
+/* $OpenBSD: uaudio.c,v 1.127 2017/05/03 06:58:11 ratchov Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -371,7 +371,6 @@ void uaudio_chan_rintr
int uaudio_open(void *, int);
void uaudio_close(void *);
-int uaudio_drain(void *);
void uaudio_get_minmax_rates
(int, const struct as_info *, const struct audio_params *,
int, int, int, u_long *, u_long *);
@@ -563,7 +562,6 @@ int
uaudio_detach(struct device *self, int flags)
{
struct uaudio_softc *sc = (struct uaudio_softc *)self;
- int rv = 0;
/*
* sc_alts may be NULL if uaudio_identify_as() failed, in
@@ -571,14 +569,8 @@ uaudio_detach(struct device *self, int flags)
* nothing to detach.
*/
if (sc->sc_alts == NULL)
- return (rv);
-
- /* Wait for outstanding requests to complete. */
- uaudio_drain(sc);
-
- rv = config_detach_children(self, flags);
-
- return (rv);
+ return (0);
+ return (config_detach_children(self, flags));
}
const usb_interface_descriptor_t *
@@ -2110,24 +2102,6 @@ uaudio_close(void *addr)
}
int
-uaudio_drain(void *addr)
-{
- struct uaudio_softc *sc = addr;
- struct chan *pchan = &sc->sc_playchan;
- struct chan *rchan = &sc->sc_recchan;
- int ms = 0;
-
- /* Wait for outstanding requests to complete. */
- if (pchan->altidx != -1 && sc->sc_alts[pchan->altidx].sc_busy)
- ms = max(ms, pchan->reqms);
- if (rchan->altidx != -1 && sc->sc_alts[rchan->altidx].sc_busy)
- ms = max(ms, rchan->reqms);
- usbd_delay_ms(sc->sc_udev, UAUDIO_NCHANBUFS * ms);
-
- return (0);
-}
-
-int
uaudio_halt_out_dma(void *addr)
{
struct uaudio_softc *sc = addr;