From 82351d991e59bf56dff6fac296a0f2a365ca1f33 Mon Sep 17 00:00:00 2001 From: Marc Balmer Date: Mon, 18 Jun 2007 09:55:59 +0000 Subject: Use the right interface id when iterating over the control interface endpoints. bug found and patch provided by Marc Winiger . ok dlg. --- sys/dev/usb/umodem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3