Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/spi Fix the while condition: sleep while the SPI_F_D...
details: https://anonhg.NetBSD.org/src/rev/5f76dae4a708
branches: trunk
changeset: 757102:5f76dae4a708
user: jym <jym%NetBSD.org@localhost>
date: Sat Aug 14 20:49:21 2010 +0000
description:
Fix the while condition: sleep while the SPI_F_DONE bit is not set.
'!' takes precedence over bitwise operation '&', so use parenthesis.
diffstat:
sys/dev/spi/spi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 40a582d5066f -r 5f76dae4a708 sys/dev/spi/spi.c
--- a/sys/dev/spi/spi.c Sat Aug 14 18:28:59 2010 +0000
+++ b/sys/dev/spi/spi.c Sat Aug 14 20:49:21 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index