diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index eaee42b9d..935234201 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -592,8 +592,16 @@ void cx88_wakeup(struct cx88_core *core, break; buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); +#if 0 if (buf->count > count) break; +#else + /* count comes from the hw and is is 16bit wide -- + * this trick is taken from the time_after() macro and + * hopefully handles wrap-arounds correctly ... */ + if ((s16)count - (s16)buf->count < 0) + break; +#endif do_gettimeofday(&buf->vb.ts); dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i, count, buf->count); |