summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx88/cx88-alsa.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-08-29 09:11:54 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 11:29:51 +0100
commit5e7045e3fa4976a37c6bbf337729ea47d0c886d0 (patch)
tree8acc1cb9e2105bba2789da0a325941ec1f31a0d3 /drivers/media/pci/cx88/cx88-alsa.c
parent[media] cx88: drop cx88_free_buffer (diff)
downloadlinux-5e7045e3fa4976a37c6bbf337729ea47d0c886d0.tar.xz
linux-5e7045e3fa4976a37c6bbf337729ea47d0c886d0.zip
[media] cx88: remove dependency on btcx-risc
btcx-risc is for the bt8xx driver and other drivers shouldn't depend on it. There is no benefit to use that module just to do a pci_zalloc_consistent. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-alsa.c')
-rw-r--r--drivers/media/pci/cx88/cx88-alsa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
index 73021a22de1b..7f8dc60028d5 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -61,7 +61,7 @@
struct cx88_audio_buffer {
unsigned int bpl;
- struct btcx_riscmem risc;
+ struct cx88_riscmem risc;
void *vaddr;
struct scatterlist *sglist;
int sglen;
@@ -370,12 +370,15 @@ static int cx88_alsa_dma_free(struct cx88_audio_buffer *buf)
static int dsp_buffer_free(snd_cx88_card_t *chip)
{
+ struct cx88_riscmem *risc = &chip->buf->risc;
+
BUG_ON(!chip->dma_size);
dprintk(2,"Freeing buffer\n");
cx88_alsa_dma_unmap(chip);
cx88_alsa_dma_free(chip->buf);
- btcx_riscmem_free(chip->pci, &chip->buf->risc);
+ if (risc->cpu)
+ pci_free_consistent(chip->pci, risc->size, risc->cpu, risc->dma);
kfree(chip->buf);
chip->buf = NULL;