From: Ricardo Cerqueira Date: Mon, 27 Mar 2006 12:16:31 +0000 (-0300) Subject: V4L/DVB (3620): Fix video-buf PCI wrappers X-Git-Tag: v2.6.17-rc1~12^2~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=731f902edaf3ed16f8ed9e92d79e3d0d17af608f;p=linux-2.6 V4L/DVB (3620): Fix video-buf PCI wrappers After the recent video-buf "generic" adaptation, the PCI wrappers got completely broken, and all of the DMA sound modules stopped working (and failed with an oops) Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index fb09c43c03..acc5ea9366 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c @@ -399,19 +399,25 @@ void videobuf_queue_pci(struct videobuf_queue* q) int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma) { struct videobuf_queue q; + struct videobuf_queue_ops qops; q.dev=pci; - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; + q.ops = &qops; - return (videobuf_dma_unmap(&q,dma)); + return (videobuf_dma_map(&q,dma)); } int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma) { struct videobuf_queue q; + struct videobuf_queue_ops qops; q.dev=pci; - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; + q.ops = &qops; return (videobuf_dma_unmap(&q,dma)); }