From 1294cd03e1b13b320f578c5673d6244ff3914f2b Mon Sep 17 00:00:00 2001 From: Nick Hibma Date: Mon, 5 Apr 1999 17:01:52 +0000 Subject: bugfix: initialise timeout for usbd_device_request as well. moved statements around to reflect sequence in the struct, to make finding these discrepancies easier. --- sys/dev/usb/usbdi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb') diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 0e636350c863..7c991048d23e 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -265,15 +265,16 @@ usbd_setup_request(reqh, pipe, priv, buffer, length, flags, timeout, callback) usbd_status)); { reqh->pipe = pipe; - reqh->isreq = 0; reqh->priv = priv; reqh->buffer = buffer; reqh->length = length; reqh->actlen = 0; reqh->flags = flags; - reqh->callback = callback; + reqh->timeout = timeout; reqh->status = USBD_NOT_STARTED; + reqh->callback = callback; reqh->retries = 1; + reqh->isreq = 0; return (USBD_NORMAL_COMPLETION); } @@ -312,8 +313,8 @@ usbd_setup_default_request(reqh, dev, priv, timeout, req, buffer, reqh->status = USBD_NOT_STARTED; reqh->callback = callback; reqh->request = *req; - reqh->isreq = 1; reqh->retries = 1; + reqh->isreq = 1; return (USBD_NORMAL_COMPLETION); } -- cgit v1.3