summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-18 09:55:59 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-18 09:55:59 +0000
commit82351d991e59bf56dff6fac296a0f2a365ca1f33 (patch)
treeab505c32848bdba8d33e4c2189850b0c4e979bb0 /sys/dev
parent1aca1a5b08439b9e0c36c7c67e15bada8c571a16 (diff)
Use the right interface id when iterating over the control interface
endpoints. bug found and patch provided by Marc Winiger <mw@msys.ch>. ok dlg.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/umodem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index b2bcd5205a8..d5334e0f040 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umodem.c,v 1.33 2007/06/14 10:11:16 mbalmer Exp $ */
+/* $OpenBSD: umodem.c,v 1.34 2007/06/18 09:55:58 mbalmer Exp $ */
/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */
/*
@@ -353,6 +353,7 @@ umodem_attach(struct device *parent, struct device *self, void *aux)
sc->sc_ctl_notify = -1;
sc->sc_notify_pipe = NULL;
+ id = usbd_get_interface_descriptor(sc->sc_ctl_iface);
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(sc->sc_ctl_iface, i);
if (ed == NULL)