[PATCH 37/37] staging: comedi: das16: board is not a PCI device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/das16.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
index e0b41ae..294cd81 100644
--- a/drivers/staging/comedi/drivers/das16.c
+++ b/drivers/staging/comedi/drivers/das16.c
@@ -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,8 +1038,8 @@ 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->virt_addr, dma->hw_addr);
+			dma_free_coherent(NULL, DAS16_DMA_SIZE,
+					  dma->virt_addr, dma->hw_addr);
 	}
 	if (devpriv->dma_chan)
 		free_dma(devpriv->dma_chan);
-- 
2.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux