diff options
Diffstat (limited to 'linux/drivers/media/video/video-buf.c')
-rw-r--r-- | linux/drivers/media/video/video-buf.c | 5 |
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; } |