diff options
author | 2008-07-06 13:50:36 +0000 | |
---|---|---|
committer | 2008-07-06 13:50:36 +0000 | |
commit | 10ac1e6a9d4c5186b209ffeb47ea4d7cd2e5b050 (patch) | |
tree | d0ab10a3db6c6eedda2164ee2b62542631a1b581 | |
parent | spacing. (diff) | |
download | wireguard-openbsd-10ac1e6a9d4c5186b209ffeb47ea4d7cd2e5b050.tar.xz wireguard-openbsd-10ac1e6a9d4c5186b209ffeb47ea4d7cd2e5b050.zip |
When the device gets close switch back from alternate interface to
default interface. Nice side effect; Turns off the cams LED again.
-rw-r--r-- | sys/dev/usb/uvideo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 375b7dff244..36f1aadad2a 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.46 2008/07/03 09:50:04 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.47 2008/07/06 13:50:36 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -750,7 +750,7 @@ uvideo_vs_parse_desc_alt(struct uvideo_softc *sc, struct usb_attach_arg *uaa, } } - /* set back first alternate, otherwise negotation can fail */ + /* switch back to default interface, otherwise negotation could fail */ error = usbd_set_interface(uaa->ifaces[iface], 0); if (error) { printf("%s: could not set alternate interface 0!\n", @@ -1141,6 +1141,9 @@ uvideo_vs_close(struct uvideo_softc *sc) usbd_close_pipe(sc->sc_vs_curr->pipeh); sc->sc_vs_curr->pipeh = NULL; } + + /* switch back to default interface (turns off cam LED) */ + (void)usbd_set_interface(sc->sc_vs_curr->ifaceh, 0); } void |