summaryrefslogtreecommitdiff
path: root/sys/dev/onewire
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2013-04-10 01:35:56 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2013-04-10 01:35:56 +0000
commitae8b0483dbf4c7520407bab46a41e05336e0f899 (patch)
treeca95dfbc4b96f97d5c8b54522ab51efb2fff099d /sys/dev/onewire
parent544774105036bd144223e6ee478a376c9f0f3c3b (diff)
Fix various glitches in queue macro usage.
ok millert@
Diffstat (limited to 'sys/dev/onewire')
-rw-r--r--sys/dev/onewire/onewire.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/onewire/onewire.c b/sys/dev/onewire/onewire.c
index 67103882146..745fd594c17 100644
--- a/sys/dev/onewire/onewire.c
+++ b/sys/dev/onewire/onewire.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: onewire.c,v 1.12 2011/07/03 15:47:16 matthew Exp $ */
+/* $OpenBSD: onewire.c,v 1.13 2013/04/10 01:35:55 guenther Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -489,9 +489,7 @@ onewire_scan(struct onewire_softc *sc)
out:
/* Detach disappeared devices */
- for (d = TAILQ_FIRST(&sc->sc_devs);
- d != TAILQ_END(&sc->sc_dev); d = next) {
- next = TAILQ_NEXT(d, d_list);
+ TAILQ_FOREACH_SAFE(d, &sc->sc_devs, d_list, next) {
if (!d->d_present) {
if (d->d_dev != NULL)
config_detach(d->d_dev, DETACH_FORCE);