diff options
| author | Nick Hibma <n_hibma@FreeBSD.org> | 1999-04-20 22:37:18 +0000 |
|---|---|---|
| committer | Nick Hibma <n_hibma@FreeBSD.org> | 1999-04-20 22:37:18 +0000 |
| commit | 38a3a046fcb92d486ba6d15482d433d5bf15cec8 (patch) | |
| tree | 5754786d6440b258c7880a68bf274a806d1d6152 /sys/dev/usb | |
| parent | 1d8ca40c41d6d4e4e1f1a60e6835384367222c7f (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 4 | ||||
| -rw-r--r-- | sys/dev/usb/usbdi.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 838d778e857c..cba6d3b20e45 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1040,7 +1040,11 @@ usb_start_next(pipe) #endif /* First remove remove old */ +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, SIMPLEQ_FIRST(&pipe->queue), next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif if (pipe->state != USBD_PIPE_ACTIVE) { pipe->running = 0; return; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 8b88cd3312c3..ee2f041c1d59 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -261,7 +261,11 @@ usbd_alloc_request() reqh = SIMPLEQ_FIRST(&usbd_free_requests); if (reqh) +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&usbd_free_requests, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&usbd_free_requests, next); +#endif else reqh = malloc(sizeof(*reqh), M_USB, M_NOWAIT); if (!reqh) @@ -918,7 +922,11 @@ usbd_ar_pipe(pipe) reqh = SIMPLEQ_FIRST(&pipe->queue); if (reqh == 0) break; +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif reqh->status = USBD_CANCELLED; if (reqh->callback) reqh->callback(reqh, reqh->priv, reqh->status); @@ -926,7 +934,11 @@ usbd_ar_pipe(pipe) #else while ((reqh = SIMPLEQ_FIRST(&pipe->queue))) { pipe->methods->abort(reqh); +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif } #endif return (USBD_NORMAL_COMPLETION); |
