summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-06 13:50:37 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-06 13:50:37 +0000
commit64258cfd7032e7872fd802746cfb9f60aa5603d3 (patch)
tree76593f75ffaa35bce5c0455540869e5d9fb12430 /sys/dev
parentd25a1e039278f14cf01afeebc9cdd8c0e4813999 (diff)
When the device gets close switch back from alternate interface to
default interface. Nice side effect; Turns off the cams LED again.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uvideo.c7
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