diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ringbuffer.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ringbuffer.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c index 77ad2410f4d3..f233248358c4 100644 --- a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c +++ b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c | |||
@@ -45,6 +45,7 @@ void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len) | |||
45 | rbuf->pread=rbuf->pwrite=0; | 45 | rbuf->pread=rbuf->pwrite=0; |
46 | rbuf->data=data; | 46 | rbuf->data=data; |
47 | rbuf->size=len; | 47 | rbuf->size=len; |
48 | rbuf->error=0; | ||
48 | 49 | ||
49 | init_waitqueue_head(&rbuf->queue); | 50 | init_waitqueue_head(&rbuf->queue); |
50 | 51 | ||
@@ -86,7 +87,8 @@ ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf) | |||
86 | 87 | ||
87 | void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf) | 88 | void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf) |
88 | { | 89 | { |
89 | rbuf->pread = rbuf->pwrite; | 90 | rbuf->pread = rbuf->pwrite = 0; |
91 | rbuf->error = 0; | ||
90 | } | 92 | } |
91 | 93 | ||
92 | 94 | ||
diff --git a/drivers/media/dvb/dvb-core/dvb_ringbuffer.h b/drivers/media/dvb/dvb-core/dvb_ringbuffer.h index 6d2560972771..d97714e75736 100644 --- a/drivers/media/dvb/dvb-core/dvb_ringbuffer.h +++ b/drivers/media/dvb/dvb-core/dvb_ringbuffer.h | |||
@@ -35,6 +35,7 @@ struct dvb_ringbuffer { | |||
35 | ssize_t size; | 35 | ssize_t size; |
36 | ssize_t pread; | 36 | ssize_t pread; |
37 | ssize_t pwrite; | 37 | ssize_t pwrite; |
38 | int error; | ||
38 | 39 | ||
39 | wait_queue_head_t queue; | 40 | wait_queue_head_t queue; |
40 | spinlock_t lock; | 41 | spinlock_t lock; |