From 39ac2fd604df2226d5d70f2377e01e1fee74f805 Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Tue, 6 Apr 2004 13:19:26 +0000 Subject: - make pci_sync change depend on kernel version. --- linux/drivers/media/video/video-buf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux/drivers/media/video/video-buf.c') 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; } -- cgit v1.2.3