Commit ed077587 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: das16: board is not a PCI device

The DAS16 board is an ISA device not a PCI device. For aesthetics, use
dma_{alloc,free}_coherent() to allocate and free the DMA buffers instead
of the PCI versions.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 742c4a09
......@@ -72,7 +72,6 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <asm/dma.h>
......@@ -1010,8 +1009,8 @@ static int das16_alloc_dma(struct comedi_device *dev, unsigned int dma_chan)
for (i = 0; i < 2; i++) {
dma = &devpriv->dma_desc[i];
dma->virt_addr = pci_alloc_consistent(NULL, DAS16_DMA_SIZE,
&dma->hw_addr);
dma->virt_addr = dma_alloc_coherent(NULL, DAS16_DMA_SIZE,
&dma->hw_addr, GFP_KERNEL);
if (!dma->virt_addr)
return -ENOMEM;
}
......@@ -1039,7 +1038,7 @@ static void das16_free_dma(struct comedi_device *dev)
for (i = 0; i < 2; i++) {
dma = &devpriv->dma_desc[i];
if (dma->virt_addr)
pci_free_consistent(NULL, DAS16_DMA_SIZE,
dma_free_coherent(NULL, DAS16_DMA_SIZE,
dma->virt_addr, dma->hw_addr);
}
if (devpriv->dma_chan)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment