summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-05-19 17:33:06 +0000
committerMichael Hunold <devnull@localhost>2003-05-19 17:33:06 +0000
commit1b96056da548c2823012c52a69e671310ff3445b (patch)
treebdacde53ad08265b7713e75f44d2fba881f08591 /linux/drivers/media/common/saa7146_fops.c
parent78fccbe2a473cdf42a87d98fedaa89f4880da05d (diff)
downloadmediapointer-dvb-s2-1b96056da548c2823012c52a69e671310ff3445b.tar.gz
mediapointer-dvb-s2-1b96056da548c2823012c52a69e671310ff3445b.tar.bz2
First try to use pci_consistent_dma() throughout the whole saa7146
driver subsystem.
Diffstat (limited to 'linux/drivers/media/common/saa7146_fops.c')
-rw-r--r--linux/drivers/media/common/saa7146_fops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 0284b1327..b428043bd 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -107,7 +107,7 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
saa7146_write(dev, PROT_ADDR1, 0);
/* write the address of the rps-program */
- saa7146_write(dev, RPS_ADDR0, virt_to_bus(&dev->rps0[ 0]));
+ saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
/* turn on rps */
saa7146_write(dev, MC1, (MASK_12 | MASK_28));
}
@@ -318,11 +318,11 @@ static ssize_t fops_read(struct file *file, char *data, size_t count, loff_t *pp
switch (fh->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE: {
- DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%d\n",file, data, count));
+ DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun", file, data, (unsigned long)count));
return saa7146_video_uops.read(file,data,count,ppos);
}
case V4L2_BUF_TYPE_VBI_CAPTURE: {
- DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%d\n",file, data, count));
+ DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n", file, data, (unsigned long)count));
return saa7146_vbi_uops.read(file,data,count,ppos);
}
break;
@@ -389,13 +389,13 @@ int saa7146_vv_init(struct saa7146_dev* dev)
vv->video_minor = -1;
vv->vbi_minor = -1;
- vv->clipping = (u32*)kmalloc(SAA7146_CLIPPING_MEM, GFP_KERNEL);
- if( NULL == vv->clipping ) {
+ vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
+ if( NULL == vv->d_clipping.cpu_addr ) {
ERR(("out of memory. aborting.\n"));
kfree(vv);
return -1;
}
- memset(vv->clipping, 0x0, SAA7146_CLIPPING_MEM);
+ memset(vv->d_clipping.cpu_addr, 0x0, SAA7146_CLIPPING_MEM);
saa7146_video_uops.init(dev,vv);
saa7146_vbi_uops.init(dev,vv);
@@ -412,7 +412,7 @@ int saa7146_vv_release(struct saa7146_dev* dev)
DEB_EE(("dev:%p\n",dev));
- kfree(vv->clipping);
+ pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
kfree(vv);
dev->vv_data = NULL;
dev->vv_callback = NULL;