]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/common/saa7146_fops.c
mlx4_core: Fix state check in mlx4_qp_modify()
[linux-2.6-omap-h63xx.git] / drivers / media / common / saa7146_fops.c
index d867a6a9e43065335894bf93da8f00bc74a46c67..67d1b1b1b25420245ca5e28de9e45cf4dd65e95b 100644 (file)
@@ -53,13 +53,14 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
 void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
                                                struct saa7146_buf *buf)
 {
+       struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
        DEB_EE(("dev:%p, buf:%p\n",dev,buf));
 
        BUG_ON(in_interrupt());
 
        videobuf_waiton(&buf->vb,0,0);
-       videobuf_dma_unmap(q, &buf->vb.dma);
-       videobuf_dma_free(&buf->vb.dma);
+       videobuf_dma_unmap(q, dma);
+       videobuf_dma_free(dma);
        buf->vb.state = STATE_NEEDS_INIT;
 }
 
@@ -307,7 +308,6 @@ static int fops_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg);
 static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
 /*
@@ -416,7 +416,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou
        }
 }
 
-static struct file_operations video_fops =
+static const struct file_operations video_fops =
 {
        .owner          = THIS_MODULE,
        .open           = fops_open,
@@ -508,7 +508,7 @@ int saa7146_vv_release(struct saa7146_dev* dev)
 
        DEB_EE(("dev:%p\n",dev));
 
-       pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
+       pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
        kfree(vv);
        dev->vv_data = NULL;
        dev->vv_callback = NULL;