summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-04-20 22:37:18 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-04-20 22:37:18 +0000
commit4fc9be52674835f5e227469c3f47fb7178a78cff (patch)
tree82265426ea1dfaa97b73adb027129bf2c9c509ef /sys/dev/usb/usbdi.c
parente795cd37ab210201c9db979663ad8d29d2d00620 (diff)
downloadFreeBSD-src-4fc9be52674835f5e227469c3f47fb7178a78cff.zip
FreeBSD-src-4fc9be52674835f5e227469c3f47fb7178a78cff.tar.gz
Remove feature creep: STAILQ_REMOVE_HEAD_UNTIL added it for convenience
but we can do without it.
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r--sys/dev/usb/usbdi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 8b88cd3..ee2f041 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);
OpenPOWER on IntegriCloud