]> err.no Git - linux-2.6/commitdiff
V4L/DVB (3500): Ringbuffer: don't reset pointers to zero
authorAndreas Oberritter <obi@linuxtv.org>
Tue, 14 Mar 2006 20:30:09 +0000 (17:30 -0300)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 21 Mar 2006 16:53:27 +0000 (08:53 -0800)
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@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-core/dvb_ringbuffer.c

index f233248358c4d813f94769a9019f018ab1f8afa6..c972fe014c58283bdbca41f584cb76be583b0b61 100644 (file)
@@ -87,7 +87,7 @@ ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf)
 
 void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
 {
-       rbuf->pread = rbuf->pwrite = 0;
+       rbuf->pread = rbuf->pwrite;
        rbuf->error = 0;
 }