On Thu, Oct 27, 2022 at 08:28:53PM +0000, Klemens Nanni wrote: > On Thu, Oct 27, 2022 at 03:49:55PM +0200, Alexandre Ratchov wrote: > > On Thu, Oct 27, 2022 at 01:09:57PM +0000, Klemens Nanni wrote: > > > @@ -1859,6 +1857,9 @@ utvfu_audio_open(void *v, int flags) > > > if (usbd_is_dying(sc->sc_udev)) > > > return (EIO); > > > > > > + if ((flags & (FWRITE | FREAD))) > > > + return (ENXIO); > > > + > > > if ((flags & FWRITE)) > > > return (ENXIO); > > > > > > > We already return ENXIO if playback is requested, so no need for the > > additional full-duplex check > > Yes. My diff was purely mechanical and this single occasion does does > not need an aditional check. > > Feedback? OK? >
ok ratchov@ > --- > sys/dev/usb/utvfu.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/sys/dev/usb/utvfu.c b/sys/dev/usb/utvfu.c > index 930f2d12568..37b76ffb285 100644 > --- a/sys/dev/usb/utvfu.c > +++ b/sys/dev/usb/utvfu.c > @@ -795,7 +795,6 @@ int utvfu_audio_halt_in(void *); > int utvfu_audio_mixer_set_port(void *, struct mixer_ctrl *); > int utvfu_audio_mixer_get_port(void *, struct mixer_ctrl *); > int utvfu_audio_query_devinfo(void *, struct mixer_devinfo *); > -int utvfu_audio_get_props(void *); > int utvfu_audio_trigger_output(void *, void *, void *, int, > void (*)(void *), void *, struct audio_params *); > int utvfu_audio_trigger_input(void *, void *, void *, int, > @@ -851,7 +850,6 @@ const struct audio_hw_if utvfu_au_hw_if = { > .set_port = utvfu_audio_mixer_set_port, > .get_port = utvfu_audio_mixer_get_port, > .query_devinfo = utvfu_audio_query_devinfo, > - .get_props = utvfu_audio_get_props, > .trigger_output = utvfu_audio_trigger_output, > .trigger_input = utvfu_audio_trigger_input, > }; > @@ -1995,12 +1993,6 @@ utvfu_audio_query_devinfo(void *v, struct > mixer_devinfo *mi) > return (0); > } > > -int > -utvfu_audio_get_props(void *v) > -{ > - return (0); > -} > - > int > utvfu_audio_trigger_output(void *v, void *start, void *end, int blksize, > void (*intr)(void *), void *arg, struct audio_params *param) > -- > 2.38.1 > >