diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-05 10:02:08 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-05 10:02:08 +0000 |
commit | ed1eb8e657f8334195364360e9ededf5356b3f66 (patch) | |
tree | 1cb80d696433da2bad1a1d083bcbdb4cd2223c9b /sys/dev/ic | |
parent | 92d02aa0671f9f628f5aa047b05d54751a6afaf3 (diff) |
rearrange the busywait funcs slightly
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/sili.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c index f81198cf8b7..c1999590add 100644 --- a/sys/dev/ic/sili.c +++ b/sys/dev/ic/sili.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili.c,v 1.8 2007/04/05 10:00:02 dlg Exp $ */ +/* $OpenBSD: sili.c,v 1.9 2007/04/05 10:02:07 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -204,10 +204,11 @@ sili_pwait_eq(struct sili_port *sp, bus_size_t r, u_int32_t mask, u_int32_t value, int timeout) { while ((sili_pread(sp, r) & mask) != value) { - if (timeout-- == 0) + if (timeout == 0) return (0); delay(1000); + timeout--; } return (1); @@ -218,10 +219,11 @@ sili_pwait_ne(struct sili_port *sp, bus_size_t r, u_int32_t mask, u_int32_t value, int timeout) { while ((sili_pread(sp, r) & mask) == value) { - if (timeout-- == 0) + if (timeout == 0) return (0); delay(1000); + timeout--; } return (1); |