diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-11 09:36:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 14:21:45 -0400 |
commit | 952684035a91334dbe33b15063514cab5e7c6907 (patch) | |
tree | fbd82c8a9af67ab15369a1f120feafaa8836aa14 /drivers/media/video/saa7134 | |
parent | a438d6da52b991b6896742a0f9aed80c2f82da87 (diff) |
V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functions
Instead of creating dirty wrappers around videobuf_dma_map/unmap that
create a dummy videobuf_queue structure, modify videobuf_dma_map/unmap
to take a device pointer argument and use it directly. The
videobuf_sg_dma_map/unmap then become unused and can be removed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index d3bd82ad010a..5bca2abb31e6 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -630,7 +630,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
630 | /* release the old buffer */ | 630 | /* release the old buffer */ |
631 | if (substream->runtime->dma_area) { | 631 | if (substream->runtime->dma_area) { |
632 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 632 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
633 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); | 633 | videobuf_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
634 | dsp_buffer_free(dev); | 634 | dsp_buffer_free(dev); |
635 | substream->runtime->dma_area = NULL; | 635 | substream->runtime->dma_area = NULL; |
636 | } | 636 | } |
@@ -646,12 +646,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
646 | return err; | 646 | return err; |
647 | } | 647 | } |
648 | 648 | ||
649 | if (0 != (err = videobuf_sg_dma_map(&dev->pci->dev, &dev->dmasound.dma))) { | 649 | if (0 != (err = videobuf_dma_map(&dev->pci->dev, &dev->dmasound.dma))) { |
650 | dsp_buffer_free(dev); | 650 | dsp_buffer_free(dev); |
651 | return err; | 651 | return err; |
652 | } | 652 | } |
653 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) { | 653 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) { |
654 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); | 654 | videobuf_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
655 | dsp_buffer_free(dev); | 655 | dsp_buffer_free(dev); |
656 | return err; | 656 | return err; |
657 | } | 657 | } |
@@ -660,7 +660,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
660 | dev->dmasound.dma.sglen, | 660 | dev->dmasound.dma.sglen, |
661 | 0))) { | 661 | 0))) { |
662 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 662 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
663 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); | 663 | videobuf_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
664 | dsp_buffer_free(dev); | 664 | dsp_buffer_free(dev); |
665 | return err; | 665 | return err; |
666 | } | 666 | } |
@@ -696,7 +696,7 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) | |||
696 | 696 | ||
697 | if (substream->runtime->dma_area) { | 697 | if (substream->runtime->dma_area) { |
698 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 698 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
699 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); | 699 | videobuf_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
700 | dsp_buffer_free(dev); | 700 | dsp_buffer_free(dev); |
701 | substream->runtime->dma_area = NULL; | 701 | substream->runtime->dma_area = NULL; |
702 | } | 702 | } |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 90f231881297..40bc635e8a3f 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -256,7 +256,7 @@ void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf) | |||
256 | BUG_ON(in_interrupt()); | 256 | BUG_ON(in_interrupt()); |
257 | 257 | ||
258 | videobuf_waiton(&buf->vb,0,0); | 258 | videobuf_waiton(&buf->vb,0,0); |
259 | videobuf_dma_unmap(q, dma); | 259 | videobuf_dma_unmap(q->dev, dma); |
260 | videobuf_dma_free(dma); | 260 | videobuf_dma_free(dma); |
261 | buf->vb.state = VIDEOBUF_NEEDS_INIT; | 261 | buf->vb.state = VIDEOBUF_NEEDS_INIT; |
262 | } | 262 | } |