Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb no need for TAILQ_FOREACH_SAFE in dwc_otg_softintr
details: https://anonhg.NetBSD.org/src/rev/b927a40d4fa7
branches: trunk
changeset: 784239:b927a40d4fa7
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Jan 22 21:59:52 2013 +0000
description:
no need for TAILQ_FOREACH_SAFE in dwc_otg_softintr
diffstat:
sys/dev/usb/dwc_otg.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r d8941410f055 -r b927a40d4fa7 sys/dev/usb/dwc_otg.c
--- a/sys/dev/usb/dwc_otg.c Tue Jan 22 21:29:53 2013 +0000
+++ b/sys/dev/usb/dwc_otg.c Tue Jan 22 21:59:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_otg.c,v 1.36 2013/01/22 20:50:04 jmcneill Exp $ */
+/* $NetBSD: dwc_otg.c,v 1.37 2013/01/22 21:59:52 jmcneill Exp $ */
/*-
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.36 2013/01/22 20:50:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.37 2013/01/22 21:59:52 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -413,7 +413,7 @@
{
struct usbd_bus *bus = v;
struct dwc_otg_softc *sc = bus->hci_private;
- struct dwc_otg_xfer *dxfer, *tmp;
+ struct dwc_otg_xfer *dxfer;
KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
@@ -422,7 +422,7 @@
DPRINTF("\n");
mutex_spin_enter(&sc->sc_intr_lock);
- TAILQ_FOREACH_SAFE(dxfer, &sc->sc_complete, xnext, tmp) {
+ while ((dxfer = TAILQ_FIRST(&sc->sc_complete)) != NULL) {
TAILQ_REMOVE(&sc->sc_complete, dxfer, xnext);
mutex_spin_exit(&sc->sc_intr_lock);
usb_transfer_complete(&dxfer->xfer);
Home |
Main Index |
Thread Index |
Old Index