aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-08-29 04:40:47 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 05:28:30 -0500
commit999b3ceb849b5b9ed25739fea2e69adef09845c7 (patch)
treeb75bdc12be8f02998d4bceb460415eef6693cac3
parenteddd3263208e3e4f80665bbec9d16f02c98986e8 (diff)
[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>
-rw-r--r--drivers/media/pci/cx88/cx88-blackbird.c2
-rw-r--r--drivers/media/pci/cx88/cx88-core.c7
-rw-r--r--drivers/media/pci/cx88/cx88-dvb.c2
-rw-r--r--drivers/media/pci/cx88/cx88-mpeg.c6
-rw-r--r--drivers/media/pci/cx88/cx88-vbi.c2
-rw-r--r--drivers/media/pci/cx88/cx88-video.c2
-rw-r--r--drivers/media/pci/cx88/cx88.h2
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)
667 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); 667 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb);
668 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); 668 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0);
669 669
670 cx88_free_buffer(vb->vb2_queue, buf); 670 btcx_riscmem_free(dev->pci, &buf->risc);
671 671
672 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); 672 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE);
673} 673}
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,
198 return 0; 198 return 0;
199} 199}
200 200
201void
202cx88_free_buffer(struct vb2_queue *q, struct cx88_buffer *buf)
203{
204 btcx_riscmem_free(to_pci_dev(q->drv_priv), &buf->risc);
205}
206
207/* ------------------------------------------------------------------ */ 201/* ------------------------------------------------------------------ */
208/* our SRAM memory layout */ 202/* our SRAM memory layout */
209 203
@@ -1072,7 +1066,6 @@ EXPORT_SYMBOL(cx88_shutdown);
1072 1066
1073EXPORT_SYMBOL(cx88_risc_buffer); 1067EXPORT_SYMBOL(cx88_risc_buffer);
1074EXPORT_SYMBOL(cx88_risc_databuffer); 1068EXPORT_SYMBOL(cx88_risc_databuffer);
1075EXPORT_SYMBOL(cx88_free_buffer);
1076 1069
1077EXPORT_SYMBOL(cx88_sram_channels); 1070EXPORT_SYMBOL(cx88_sram_channels);
1078EXPORT_SYMBOL(cx88_sram_channel_setup); 1071EXPORT_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)
110 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); 110 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb);
111 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); 111 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0);
112 112
113 cx88_free_buffer(vb->vb2_queue, buf); 113 btcx_riscmem_free(dev->pci, &buf->risc);
114 114
115 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); 115 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE);
116} 116}
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,
238 if (!rc) 238 if (!rc)
239 return -EIO; 239 return -EIO;
240 240
241 cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl, 241 rc = cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl,
242 dev->ts_packet_size, dev->ts_packet_count, 0); 242 dev->ts_packet_size, dev->ts_packet_count, 0);
243 if (rc) {
244 btcx_riscmem_free(dev->pci, &buf->risc);
245 return rc;
246 }
243 return 0; 247 return 0;
244} 248}
245 249
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)
147 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); 147 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb);
148 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); 148 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0);
149 149
150 cx88_free_buffer(vb->vb2_queue, buf); 150 btcx_riscmem_free(dev->pci, &buf->risc);
151 151
152 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); 152 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE);
153} 153}
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)
506 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); 506 struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb);
507 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); 507 struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0);
508 508
509 cx88_free_buffer(vb->vb2_queue, buf); 509 btcx_riscmem_free(dev->pci, &buf->risc);
510 510
511 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); 511 dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE);
512} 512}
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
624cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, 624cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc,
625 struct scatterlist *sglist, unsigned int bpl, 625 struct scatterlist *sglist, unsigned int bpl,
626 unsigned int lines, unsigned int lpi); 626 unsigned int lines, unsigned int lpi);
627extern void
628cx88_free_buffer(struct vb2_queue *q, struct cx88_buffer *buf);
629 627
630extern void cx88_risc_disasm(struct cx88_core *core, 628extern void cx88_risc_disasm(struct cx88_core *core,
631 struct btcx_riscmem *risc); 629 struct btcx_riscmem *risc);