Skip to content

Commit

Permalink
V4L/DVB (3620): Fix video-buf PCI wrappers
Browse files Browse the repository at this point in the history
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 <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Ricardo Cerqueira authored and Mauro Carvalho Chehab committed Apr 2, 2006
1 parent 8dbc5ec commit 731f902
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/media/video/video-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 731f902

Please sign in to comment.