aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2003-07-15 22:19:00 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2003-07-15 22:19:00 +0000
commit9f4b5407ca6e4ab8a05ebdd46a11a93632378c9a (patch)
tree2b7cac4852ae0c55fa6e08953bbaccb8bd9c1850 /sys/dev/usb
parente65f8c784da3c397d24361dafd42a14954bf650c (diff)
downloadsrc-9f4b5407ca6e4ab8a05ebdd46a11a93632378c9a.tar.gz
src-9f4b5407ca6e4ab8a05ebdd46a11a93632378c9a.zip
sync w/ NetBSD
part of: revision 1.101 date: 2002/06/01 23:51:04; author: lukem; state: Exp; lines: +5 -7
Notes
Notes: svn path=/head/; revision=117652
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usb_port.h2
-rw-r--r--sys/dev/usb/usbdi.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 84c5acdbf5ce..82bee013ed39 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -473,6 +473,8 @@ __CONCAT(dname,_detach)(device_t self)
#define SIMPLEQ_NEXT STAILQ_NEXT
#define SIMPLEQ_FIRST STAILQ_FIRST
#define SIMPLEQ_HEAD STAILQ_HEAD
+#define SIMPLEQ_EMPTY STAILQ_EMPTY
+#define SIMPLEQ_FOREACH STAILQ_FOREACH
#define SIMPLEQ_INIT STAILQ_INIT
#define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
#define SIMPLEQ_ENTRY STAILQ_ENTRY
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index cb83d1604c78..e26d8c3bf757 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -155,9 +155,7 @@ usbd_dump_queue(usbd_pipe_handle pipe)
usbd_xfer_handle xfer;
printf("usbd_dump_queue: pipe=%p\n", pipe);
- for (xfer = SIMPLEQ_FIRST(&pipe->queue);
- xfer;
- xfer = SIMPLEQ_NEXT(xfer, next)) {
+ SIMPLEQ_FOREACH(xfer, &pipe->queue, next) {
printf(" xfer=%p\n", xfer);
}
}
@@ -270,7 +268,7 @@ usbd_close_pipe(usbd_pipe_handle pipe)
if (--pipe->refcnt != 0)
return (USBD_NORMAL_COMPLETION);
- if (SIMPLEQ_FIRST(&pipe->queue) != 0)
+ if (! SIMPLEQ_EMPTY(&pipe->queue))
return (USBD_PENDING_REQUESTS);
LIST_REMOVE(pipe, next);
pipe->endpoint->refcnt--;