summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/video-buf.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-04-06 13:19:26 +0000
committerGerd Knorr <devnull@localhost>2004-04-06 13:19:26 +0000
commit39ac2fd604df2226d5d70f2377e01e1fee74f805 (patch)
treeb775db89ab8a5de8d7d4c7b73851c2686b4c7f2a /linux/drivers/media/video/video-buf.c
parentb717f8bc0466bea7433bfd562fbaf31801420ad4 (diff)
downloadmediapointer-dvb-s2-39ac2fd604df2226d5d70f2377e01e1fee74f805.tar.gz
mediapointer-dvb-s2-39ac2fd604df2226d5d70f2377e01e1fee74f805.tar.bz2
- make pci_sync change depend on kernel version.
Diffstat (limited to 'linux/drivers/media/video/video-buf.c')
-rw-r--r--linux/drivers/media/video/video-buf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index d05531a04..d8df80232 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -230,8 +230,13 @@ int videobuf_dma_pci_sync(struct pci_dev *dev, struct videobuf_dmabuf *dma)
MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
BUG_ON(!dma->sglen);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
+ if (!dma->bus_addr)
+ pci_dma_sync_sg(dev,dma->sglist,dma->nr_pages,dma->direction);
+#else
if (!dma->bus_addr)
pci_dma_sync_sg_for_cpu(dev,dma->sglist,dma->nr_pages,dma->direction);
+#endif
return 0;
}