]> err.no Git - linux-2.6/blobdiff - drivers/media/video/cx88/cx88-vbi.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
[linux-2.6] / drivers / media / video / cx88 / cx88-vbi.c
index 72c1d19fa79fb63d3f4a6c05ab70deb6ee8f40ac..babb085564067715548bd580bc510a0a6670c939 100644 (file)
@@ -99,7 +99,6 @@ int cx8800_restart_vbi_queue(struct cx8800_dev    *dev,
                             struct cx88_dmaqueue *q)
 {
        struct cx88_buffer *buf;
-       struct list_head *item;
 
        if (list_empty(&q->active))
                return 0;
@@ -108,10 +107,8 @@ int cx8800_restart_vbi_queue(struct cx8800_dev    *dev,
        dprintk(2,"restart_queue [%p/%d]: restart dma\n",
                buf, buf->vb.i);
        cx8800_start_vbi_dma(dev, q, buf);
-       list_for_each(item,&q->active) {
-               buf = list_entry(item, struct cx88_buffer, vb.queue);
+       list_for_each_entry(buf, &q->active, vb.queue)
                buf->count = q->count++;
-       }
        mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
        return 0;
 }
@@ -172,6 +169,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
                return -EINVAL;
 
        if (STATE_NEEDS_INIT == buf->vb.state) {
+               struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
                buf->vb.width  = VBI_LINE_LENGTH;
                buf->vb.height = VBI_LINE_COUNT;
                buf->vb.size   = size;
@@ -180,7 +178,7 @@ vbi_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
                if (0 != (rc = videobuf_iolock(q,&buf->vb,NULL)))
                        goto fail;
                cx88_risc_buffer(dev->pci, &buf->risc,
-                                buf->vb.dma.sglist,
+                                dma->sglist,
                                 0, buf->vb.width * buf->vb.height,
                                 buf->vb.width, 0,
                                 buf->vb.height);