From: Andreas Oberritter Date: Tue, 14 Mar 2006 20:30:09 +0000 (-0300) Subject: V4L/DVB (3500): Ringbuffer: don't reset pointers to zero X-Git-Tag: v2.6.17-rc1~1183^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4304954eb668ce66fc58f1cab9abb9a9e2584549;p=linux-2.6 V4L/DVB (3500): Ringbuffer: don't reset pointers to zero 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c index f233248358..c972fe014c 100644 --- a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c +++ b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c @@ -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; }