diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-22 13:42:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:44 -0400 |
commit | 0705135e59f8503e4dade4b3580fed77b1743b7c (patch) | |
tree | 9ab28abeff6cb8ffa50e565204ed4394524d28d7 /drivers/media/video/cx88/cx88-alsa.c | |
parent | f13613acfb1a71895ac886dc831d6ae4e20e241a (diff) |
V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-alsa.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-alsa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 316b106c3511..2f5a4a4ba407 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -283,7 +283,7 @@ static int dsp_buffer_free(snd_cx88_card_t *chip) | |||
283 | BUG_ON(!chip->dma_size); | 283 | BUG_ON(!chip->dma_size); |
284 | 284 | ||
285 | dprintk(2,"Freeing buffer\n"); | 285 | dprintk(2,"Freeing buffer\n"); |
286 | videobuf_pci_dma_unmap(chip->pci, chip->dma_risc); | 286 | videobuf_sg_dma_unmap(&chip->pci->dev, chip->dma_risc); |
287 | videobuf_dma_free(chip->dma_risc); | 287 | videobuf_dma_free(chip->dma_risc); |
288 | btcx_riscmem_free(chip->pci,&chip->buf->risc); | 288 | btcx_riscmem_free(chip->pci,&chip->buf->risc); |
289 | kfree(chip->buf); | 289 | kfree(chip->buf); |
@@ -385,7 +385,7 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream, | |||
385 | BUG_ON(!chip->dma_size); | 385 | BUG_ON(!chip->dma_size); |
386 | BUG_ON(chip->num_periods & (chip->num_periods-1)); | 386 | BUG_ON(chip->num_periods & (chip->num_periods-1)); |
387 | 387 | ||
388 | buf = videobuf_pci_alloc(sizeof(*buf)); | 388 | buf = videobuf_sg_alloc(sizeof(*buf)); |
389 | if (NULL == buf) | 389 | if (NULL == buf) |
390 | return -ENOMEM; | 390 | return -ENOMEM; |
391 | 391 | ||
@@ -396,14 +396,14 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream, | |||
396 | buf->vb.height = chip->num_periods; | 396 | buf->vb.height = chip->num_periods; |
397 | buf->vb.size = chip->dma_size; | 397 | buf->vb.size = chip->dma_size; |
398 | 398 | ||
399 | dma=videobuf_to_dma(&buf->vb); | 399 | dma = videobuf_to_dma(&buf->vb); |
400 | videobuf_dma_init(dma); | 400 | videobuf_dma_init(dma); |
401 | ret = videobuf_dma_init_kernel(dma, PCI_DMA_FROMDEVICE, | 401 | ret = videobuf_dma_init_kernel(dma, PCI_DMA_FROMDEVICE, |
402 | (PAGE_ALIGN(buf->vb.size) >> PAGE_SHIFT)); | 402 | (PAGE_ALIGN(buf->vb.size) >> PAGE_SHIFT)); |
403 | if (ret < 0) | 403 | if (ret < 0) |
404 | goto error; | 404 | goto error; |
405 | 405 | ||
406 | ret = videobuf_pci_dma_map(chip->pci,dma); | 406 | ret = videobuf_sg_dma_map(&chip->pci->dev, dma); |
407 | if (ret < 0) | 407 | if (ret < 0) |
408 | goto error; | 408 | goto error; |
409 | 409 | ||