diff options
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-alsa.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-core.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c index 13689c5dd47f..ab14d35214aa 100644 --- a/drivers/media/pci/cx23885/cx23885-alsa.c +++ b/drivers/media/pci/cx23885/cx23885-alsa.c @@ -266,7 +266,7 @@ static int dsp_buffer_free(struct cx23885_audio_dev *chip) cx23885_alsa_dma_unmap(chip); cx23885_alsa_dma_free(chip->buf); risc = &chip->buf->risc; - pci_free_consistent(chip->pci, risc->size, risc->cpu, risc->dma); + dma_free_coherent(&chip->pci->dev, risc->size, risc->cpu, risc->dma); kfree(chip->buf); chip->buf = NULL; diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index d0ca260ecf70..f8f2ff3b00c3 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1218,7 +1218,8 @@ int cx23885_risc_buffer(struct pci_dev *pci, struct cx23885_riscmem *risc, / PAGE_SIZE + lines); instructions += 5; risc->size = instructions * 12; - risc->cpu = pci_alloc_consistent(pci, risc->size, &risc->dma); + risc->cpu = dma_alloc_coherent(&pci->dev, risc->size, &risc->dma, + GFP_KERNEL); if (risc->cpu == NULL) return -ENOMEM; @@ -1255,7 +1256,8 @@ int cx23885_risc_databuffer(struct pci_dev *pci, instructions += 4; risc->size = instructions * 12; - risc->cpu = pci_alloc_consistent(pci, risc->size, &risc->dma); + risc->cpu = dma_alloc_coherent(&pci->dev, risc->size, &risc->dma, + GFP_KERNEL); if (risc->cpu == NULL) return -ENOMEM; @@ -1293,7 +1295,8 @@ int cx23885_risc_vbibuffer(struct pci_dev *pci, struct cx23885_riscmem *risc, / PAGE_SIZE + lines); instructions += 5; risc->size = instructions * 12; - risc->cpu = pci_alloc_consistent(pci, risc->size, &risc->dma); + risc->cpu = dma_alloc_coherent(&pci->dev, risc->size, &risc->dma, + GFP_KERNEL); if (risc->cpu == NULL) return -ENOMEM; /* write risc instructions */ @@ -1322,7 +1325,7 @@ void cx23885_free_buffer(struct cx23885_dev *dev, struct cx23885_buffer *buf) { struct cx23885_riscmem *risc = &buf->risc; - pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); + dma_free_coherent(&dev->pci->dev, risc->size, risc->cpu, risc->dma); } static void cx23885_tsport_reg_dump(struct cx23885_tsport *port) @@ -2159,7 +2162,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev, (unsigned long long)pci_resource_start(pci_dev, 0)); pci_set_master(pci_dev); - err = pci_set_dma_mask(pci_dev, 0xffffffff); + err = dma_set_mask(&pci_dev->dev, 0xffffffff); if (err) { pr_err("%s/0: Oops: no 32bit PCI DMA ???\n", dev->name); goto fail_ctrl; |