[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1272310281-7418-18-git-send-email-jic23@cam.ac.uk>
Date: Mon, 26 Apr 2010 20:31:19 +0100
From: Jonathan Cameron <jic23@....ac.uk>
To: iio-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, gregkh@...e.de,
Jonathan Cameron <jic23@....ac.uk>
Subject: [PATCH 17/19] staging:iio:ring_sw: Fix incorrect test on successful read of last value, causes infinite loop
Signed-off-by: Jonathan Cameron <jic23@....ac.uk>
---
drivers/staging/iio/ring_sw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c
index 4e5134c..8d2f7cd 100644
--- a/drivers/staging/iio/ring_sw.c
+++ b/drivers/staging/iio/ring_sw.c
@@ -297,7 +297,7 @@ again:
return -EAGAIN;
memcpy(data, last_written_p_copy, ring->buf.bpd);
- if (unlikely(ring->last_written_p >= last_written_p_copy))
+ if (unlikely(ring->last_written_p != last_written_p_copy))
goto again;
iio_unmark_sw_rb_in_use(&ring->buf);
--
1.6.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists