From 20dfaff4cc53d43c5b616470d0795a4f54f55b60 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 4 Jul 2001 19:12:36 +0000 Subject: [PATCH] 2.4.6 kernel linux/mm.h does not define GFP_BUFFER... --- comedi/drivers/cb_pcidas.c | 2 +- comedi/drivers/das16.c | 2 +- comedi/drivers/das1800.c | 4 ++-- comedi/drivers/ni_at_a2150.c | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/comedi/drivers/cb_pcidas.c b/comedi/drivers/cb_pcidas.c index d00512a3..5ebff2d2 100644 --- a/comedi/drivers/cb_pcidas.c +++ b/comedi/drivers/cb_pcidas.c @@ -325,7 +325,7 @@ typedef struct // divisors of master clock for pacing unsigned int divisor1; unsigned int divisor2; - unsigned int count; //number of samples remaining + volatile unsigned int count; //number of samples remaining } cb_pcidas_private; /* diff --git a/comedi/drivers/das16.c b/comedi/drivers/das16.c index a2d3b567..d5be73a3 100644 --- a/comedi/drivers/das16.c +++ b/comedi/drivers/das16.c @@ -1259,7 +1259,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) if(dma_chan == 1 || dma_chan == 3) { // allocate dma buffer - devpriv->dma_buffer = kmalloc(DAS16_DMA_SIZE, GFP_BUFFER | GFP_DMA); + devpriv->dma_buffer = kmalloc(DAS16_DMA_SIZE, GFP_KERNEL | GFP_DMA); if(devpriv->dma_buffer == NULL) return -ENOMEM; if(request_dma(dma_chan, "das16")) diff --git a/comedi/drivers/das1800.c b/comedi/drivers/das1800.c index 0e0d11f2..71f1386c 100644 --- a/comedi/drivers/das1800.c +++ b/comedi/drivers/das1800.c @@ -648,11 +648,11 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it) devpriv->dma1 = dma1; } devpriv->dma_buf_max_size = 0x1ff00; - devpriv->dma_buf0 = kmalloc(devpriv->dma_buf_max_size, GFP_BUFFER | GFP_DMA); + devpriv->dma_buf0 = kmalloc(devpriv->dma_buf_max_size, GFP_KERNEL | GFP_DMA); if(devpriv->dma_buf0 == NULL) return -ENOMEM; devpriv->dma_current_buf = devpriv->dma_buf0; - devpriv->dma_buf1 = kmalloc(devpriv->dma_buf_max_size, GFP_BUFFER | GFP_DMA); + devpriv->dma_buf1 = kmalloc(devpriv->dma_buf_max_size, GFP_KERNEL | GFP_DMA); if(devpriv->dma_buf1 == NULL) return -ENOMEM; flags = claim_dma_lock(); diff --git a/comedi/drivers/ni_at_a2150.c b/comedi/drivers/ni_at_a2150.c index a291052a..6d4a24d7 100644 --- a/comedi/drivers/ni_at_a2150.c +++ b/comedi/drivers/ni_at_a2150.c @@ -35,6 +35,9 @@ Options: [1] - irq [2] - dma channel +References (from ftp://ftp.natinst.com/support/manuals): + + 320360.pdf AT-A2150 User Manual */ #include @@ -360,7 +363,7 @@ static int a2150_attach(comedi_device *dev, comedi_devconfig *it) printk(" failed to allocate dma channel %i\n", dma); return -EINVAL; } - devpriv->dma_buffer = kmalloc(A2150_DMA_BUFFER_SIZE, GFP_BUFFER | GFP_DMA); + devpriv->dma_buffer = kmalloc(A2150_DMA_BUFFER_SIZE, GFP_KERNEL | GFP_DMA); if(devpriv->dma_buffer == NULL) return -ENOMEM; -- 2.26.2