Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95268403 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a438d6da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
	BUG_ON(in_interrupt());

	videobuf_waiton(&buf->vb,0,0);
	videobuf_dma_unmap(q, dma);
	videobuf_dma_unmap(q->dev, dma);
	videobuf_dma_free(dma);
	buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf

	BUG_ON(in_interrupt());
	videobuf_waiton(&buf->vb,0,0);
	videobuf_dma_unmap(q, dma);
	videobuf_dma_unmap(q->dev, dma);
	videobuf_dma_free(dma);
	btcx_riscmem_free(btv->c.pci,&buf->bottom);
	btcx_riscmem_free(btv->c.pci,&buf->top);
+1 −1
Original line number Diff line number Diff line
@@ -1142,7 +1142,7 @@ void cx23885_free_buffer(struct videobuf_queue *q, struct cx23885_buffer *buf)

	BUG_ON(in_interrupt());
	videobuf_waiton(&buf->vb, 0, 0);
	videobuf_dma_unmap(q, dma);
	videobuf_dma_unmap(q->dev, dma);
	videobuf_dma_free(dma);
	btcx_riscmem_free(to_pci_dev(q->dev), &buf->risc);
	buf->vb.state = VIDEOBUF_NEEDS_INIT;
+2 −2
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ static int dsp_buffer_free(snd_cx88_card_t *chip)
	BUG_ON(!chip->dma_size);

	dprintk(2,"Freeing buffer\n");
	videobuf_sg_dma_unmap(&chip->pci->dev, chip->dma_risc);
	videobuf_dma_unmap(&chip->pci->dev, chip->dma_risc);
	videobuf_dma_free(chip->dma_risc);
	btcx_riscmem_free(chip->pci,&chip->buf->risc);
	kfree(chip->buf);
@@ -409,7 +409,7 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
	if (ret < 0)
		goto error;

	ret = videobuf_sg_dma_map(&chip->pci->dev, dma);
	ret = videobuf_dma_map(&chip->pci->dev, dma);
	if (ret < 0)
		goto error;

+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ cx88_free_buffer(struct videobuf_queue *q, struct cx88_buffer *buf)

	BUG_ON(in_interrupt());
	videobuf_waiton(&buf->vb,0,0);
	videobuf_dma_unmap(q, dma);
	videobuf_dma_unmap(q->dev, dma);
	videobuf_dma_free(dma);
	btcx_riscmem_free(to_pci_dev(q->dev), &buf->risc);
	buf->vb.state = VIDEOBUF_NEEDS_INIT;
Loading