diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-08-29 05:40:47 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 08:28:30 -0200 |
commit | 999b3ceb849b5b9ed25739fea2e69adef09845c7 (patch) | |
tree | b75bdc12be8f02998d4bceb460415eef6693cac3 /drivers | |
parent | eddd3263208e3e4f80665bbec9d16f02c98986e8 (diff) | |
download | blackbird-op-linux-999b3ceb849b5b9ed25739fea2e69adef09845c7.tar.gz blackbird-op-linux-999b3ceb849b5b9ed25739fea2e69adef09845c7.zip |
[media] cx88: drop cx88_free_buffer
Remove this function. This makes all vb2 queues behave the same, which
simplifies comparing the various vb2 queue op implementations.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/pci/cx88/cx88-blackbird.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-core.c | 7 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-dvb.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-mpeg.c | 6 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-video.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88.h | 2 |
7 files changed, 9 insertions, 14 deletions
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 11054cd903af..b24266ec2b5d 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -667,7 +667,7 @@ static void buffer_finish(struct vb2_buffer *vb) struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); - cx88_free_buffer(vb->vb2_queue, buf); + btcx_riscmem_free(dev->pci, &buf->risc); dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); } diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c index f02740860970..902b662be2ff 100644 --- a/drivers/media/pci/cx88/cx88-core.c +++ b/drivers/media/pci/cx88/cx88-core.c @@ -198,12 +198,6 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, return 0; } -void -cx88_free_buffer(struct vb2_queue *q, struct cx88_buffer *buf) -{ - btcx_riscmem_free(to_pci_dev(q->drv_priv), &buf->risc); -} - /* ------------------------------------------------------------------ */ /* our SRAM memory layout */ @@ -1072,7 +1066,6 @@ EXPORT_SYMBOL(cx88_shutdown); EXPORT_SYMBOL(cx88_risc_buffer); EXPORT_SYMBOL(cx88_risc_databuffer); -EXPORT_SYMBOL(cx88_free_buffer); EXPORT_SYMBOL(cx88_sram_channels); EXPORT_SYMBOL(cx88_sram_channel_setup); diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index d7e5c45022c9..b5b88a64ad7f 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -110,7 +110,7 @@ static void buffer_finish(struct vb2_buffer *vb) struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); - cx88_free_buffer(vb->vb2_queue, buf); + btcx_riscmem_free(dev->pci, &buf->risc); dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); } diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index 7986ee037b83..0589dccae3bd 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -238,8 +238,12 @@ int cx8802_buf_prepare(struct vb2_queue *q, struct cx8802_dev *dev, if (!rc) return -EIO; - cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl, + rc = cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl, dev->ts_packet_size, dev->ts_packet_count, 0); + if (rc) { + btcx_riscmem_free(dev->pci, &buf->risc); + return rc; + } return 0; } diff --git a/drivers/media/pci/cx88/cx88-vbi.c b/drivers/media/pci/cx88/cx88-vbi.c index 26a15331cc10..8f20612c5853 100644 --- a/drivers/media/pci/cx88/cx88-vbi.c +++ b/drivers/media/pci/cx88/cx88-vbi.c @@ -147,7 +147,7 @@ static void buffer_finish(struct vb2_buffer *vb) struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); - cx88_free_buffer(vb->vb2_queue, buf); + btcx_riscmem_free(dev->pci, &buf->risc); dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); } diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 9887da52c455..c64f8f48850f 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -506,7 +506,7 @@ static void buffer_finish(struct vb2_buffer *vb) struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); - cx88_free_buffer(vb->vb2_queue, buf); + btcx_riscmem_free(dev->pci, &buf->risc); dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); } diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index 2dadaa6f0d95..16965c84090b 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -624,8 +624,6 @@ extern int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, struct scatterlist *sglist, unsigned int bpl, unsigned int lines, unsigned int lpi); -extern void -cx88_free_buffer(struct vb2_queue *q, struct cx88_buffer *buf); extern void cx88_risc_disasm(struct cx88_core *core, struct btcx_riscmem *risc); |