Module Name: src
Committed By: jym
Date: Sat Aug 14 20:49:22 UTC 2010
Modified Files:
src/sys/dev/spi: spi.c
Log Message:
Fix the while condition: sleep while the SPI_F_DONE bit is not set.
'!' takes precedence over bitwise operation '&', so use parenthesis.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/spi/spi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/spi/spi.c
diff -u src/sys/dev/spi/spi.c:1.3 src/sys/dev/spi/spi.c:1.4
--- src/sys/dev/spi/spi.c:1.3 Sun May 4 14:21:56 2008
+++ src/sys/dev/spi/spi.c Sat Aug 14 20:49:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: spi.c,v 1.3 2008/05/04 14:21:56 xtraeme Exp $ */
+/* $NetBSD: spi.c,v 1.4 2010/08/14 20:49:21 jym Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.3 2008/05/04 14:21:56 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.4 2010/08/14 20:49:21 jym Exp $");
#include "locators.h"
@@ -271,7 +271,7 @@
s = splserial();
simple_lock(&st->st_lock);
- while (!st->st_flags & SPI_F_DONE) {
+ while (!(st->st_flags & SPI_F_DONE)) {
ltsleep(st, PWAIT, "spi_wait", 0, &st->st_lock);
}
simple_unlock(&st->st_lock);