diff options
-rw-r--r-- | drivers/staging/comedi/drivers/s626.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 084a8e7b9fc2..e7aba937d896 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2130,13 +2130,15 @@ static int s626_allocate_dma_buffers(struct comedi_device *dev) void *addr; dma_addr_t appdma; - addr = pci_alloc_consistent(pcidev, S626_DMABUF_SIZE, &appdma); + addr = dma_alloc_coherent(&pcidev->dev, S626_DMABUF_SIZE, &appdma, + GFP_KERNEL); if (!addr) return -ENOMEM; devpriv->ana_buf.logical_base = addr; devpriv->ana_buf.physical_base = appdma; - addr = pci_alloc_consistent(pcidev, S626_DMABUF_SIZE, &appdma); + addr = dma_alloc_coherent(&pcidev->dev, S626_DMABUF_SIZE, &appdma, + GFP_KERNEL); if (!addr) return -ENOMEM; devpriv->rps_buf.logical_base = addr; @@ -2154,13 +2156,13 @@ static void s626_free_dma_buffers(struct comedi_device *dev) return; if (devpriv->rps_buf.logical_base) - pci_free_consistent(pcidev, S626_DMABUF_SIZE, - devpriv->rps_buf.logical_base, - devpriv->rps_buf.physical_base); + dma_free_coherent(&pcidev->dev, S626_DMABUF_SIZE, + devpriv->rps_buf.logical_base, + devpriv->rps_buf.physical_base); if (devpriv->ana_buf.logical_base) - pci_free_consistent(pcidev, S626_DMABUF_SIZE, - devpriv->ana_buf.logical_base, - devpriv->ana_buf.physical_base); + dma_free_coherent(&pcidev->dev, S626_DMABUF_SIZE, + devpriv->ana_buf.logical_base, + devpriv->ana_buf.physical_base); } static int s626_initialize(struct comedi_device *dev) |