[linux-dvb] [PATCH] dvb_ringbuffer: don't reset pointers to zero

Andreas Oberritter obi at linuxtv.org
Tue Mar 14 19:27:46 CET 2006


From: Andreas Oberritter <obi at linuxtv.org>

Oliver Endriss spotted, that resetting read and write pointers on
flush() requires additional locking and breaks the av7110 driver.
Therefore this patch partially reverts the previous patch titled "make
dvb_ringbuffer compatible to dmxdev_buffer".

Signed-off-by: Andreas Oberritter <obi at linuxtv.org>
---

diff -r 77be5e7a5665 linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c	Mon Mar 13 13:17:11 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c	Tue Mar 14 19:15:55 2006 +0100
@@ -87,7 +87,7 @@ ssize_t dvb_ringbuffer_avail(struct dvb_
 
 void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
 {
-	rbuf->pread = rbuf->pwrite = 0;
+	rbuf->pread = rbuf->pwrite;
 	rbuf->error = 0;
 }
 





More information about the linux-dvb mailing list