diff options
author | Holger Waechtler <devnull@localhost> | 2003-02-11 10:14:18 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-02-11 10:14:18 +0000 |
commit | c42afdb957d5781cf1b35773060d1d9e636c6042 (patch) | |
tree | 9eba153828e7fa679d0ea0d0f6e48a455c05649f /linux/drivers/media/dvb | |
parent | a9c3d921ee59ce676e7461136e825fab1592991a (diff) | |
download | mediapointer-dvb-s2-c42afdb957d5781cf1b35773060d1d9e636c6042.tar.gz mediapointer-dvb-s2-c42afdb957d5781cf1b35773060d1d9e636c6042.tar.bz2 |
apply fix ring_buffer_free() logic in ci_ll_reset() contributed by Oliver Endriss <o.endriss@gmx.de>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 3bcb2551b..aeaef1045 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -3168,9 +3168,10 @@ int ci_ll_reset(ring_buffer_t *cibuf, struct file *file, { int i; - if (ring_buffer_free(cibuf)<8) + if (ring_buffer_free(cibuf)<=8) return -EBUSY; - for (i=0; i<2; i++) + + for (i=0; i<2; i++) { if (slots&(1<<i)) { cibuf->data[cibuf->pwrite]=0x00; cibuf->data[(cibuf->pwrite+1)%cibuf->size]=0x06; @@ -3183,7 +3184,9 @@ int ci_ll_reset(ring_buffer_t *cibuf, struct file *file, cibuf->pwrite=(cibuf->pwrite+8)%cibuf->size; slot[i].flags=0; } - return 0; + } + + return 0; } static ssize_t |