staging: comedi: addi_apci_3120: remove test for dma support
The boards supported by this driver support dma. Remove the tests for it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
48fdf08418
commit
4fbe36f2e9
|
@ -29,7 +29,6 @@ static const struct addi_board apci3120_boardtypes[] = {
|
||||||
.i_NbrDiChannel = 4,
|
.i_NbrDiChannel = 4,
|
||||||
.i_NbrDoChannel = 4,
|
.i_NbrDoChannel = 4,
|
||||||
.i_DoMaxdata = 0x0f,
|
.i_DoMaxdata = 0x0f,
|
||||||
.i_Dma = 1,
|
|
||||||
.i_Timer = 1,
|
.i_Timer = 1,
|
||||||
.b_AvailableConvertUnit = 1,
|
.b_AvailableConvertUnit = 1,
|
||||||
.ui_MinAcquisitiontimeNs = 10000,
|
.ui_MinAcquisitiontimeNs = 10000,
|
||||||
|
@ -65,7 +64,6 @@ static const struct addi_board apci3120_boardtypes[] = {
|
||||||
.i_NbrDiChannel = 4,
|
.i_NbrDiChannel = 4,
|
||||||
.i_NbrDoChannel = 4,
|
.i_NbrDoChannel = 4,
|
||||||
.i_DoMaxdata = 0x0f,
|
.i_DoMaxdata = 0x0f,
|
||||||
.i_Dma = 1,
|
|
||||||
.i_Timer = 1,
|
.i_Timer = 1,
|
||||||
.b_AvailableConvertUnit = 1,
|
.b_AvailableConvertUnit = 1,
|
||||||
.ui_MinAcquisitiontimeNs = 10000,
|
.ui_MinAcquisitiontimeNs = 10000,
|
||||||
|
@ -144,7 +142,6 @@ static int apci3120_attach_pci(struct comedi_device *dev,
|
||||||
ret = comedi_pci_enable(pcidev, dev->board_name);
|
ret = comedi_pci_enable(pcidev, dev->board_name);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (this_board->i_Dma)
|
|
||||||
pci_set_master(pcidev);
|
pci_set_master(pcidev);
|
||||||
|
|
||||||
if (this_board->i_IorangeBase1)
|
if (this_board->i_IorangeBase1)
|
||||||
|
@ -166,9 +163,7 @@ static int apci3120_attach_pci(struct comedi_device *dev,
|
||||||
|
|
||||||
devpriv->us_UseDma = ADDI_ENABLE;
|
devpriv->us_UseDma = ADDI_ENABLE;
|
||||||
|
|
||||||
if (this_board->i_Dma) {
|
/* Allocate DMA buffers */
|
||||||
if (devpriv->us_UseDma == ADDI_ENABLE) {
|
|
||||||
/* alloc DMA buffers */
|
|
||||||
devpriv->b_DmaDoubleBuffer = 0;
|
devpriv->b_DmaDoubleBuffer = 0;
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
for (pages = 4; pages >= 0; pages--) {
|
for (pages = 4; pages >= 0; pages--) {
|
||||||
|
@ -180,11 +175,9 @@ static int apci3120_attach_pci(struct comedi_device *dev,
|
||||||
}
|
}
|
||||||
if (devpriv->ul_DmaBufferVirtual[i]) {
|
if (devpriv->ul_DmaBufferVirtual[i]) {
|
||||||
devpriv->ui_DmaBufferPages[i] = pages;
|
devpriv->ui_DmaBufferPages[i] = pages;
|
||||||
devpriv->ui_DmaBufferSize[i] =
|
devpriv->ui_DmaBufferSize[i] = PAGE_SIZE * pages;
|
||||||
PAGE_SIZE * pages;
|
|
||||||
devpriv->ui_DmaBufferSamples[i] =
|
devpriv->ui_DmaBufferSamples[i] =
|
||||||
devpriv->
|
devpriv->ui_DmaBufferSize[i] >> 1;
|
||||||
ui_DmaBufferSize[i] >> 1;
|
|
||||||
devpriv->ul_DmaBufferHw[i] =
|
devpriv->ul_DmaBufferHw[i] =
|
||||||
virt_to_bus((void *)devpriv->
|
virt_to_bus((void *)devpriv->
|
||||||
ul_DmaBufferVirtual[i]);
|
ul_DmaBufferVirtual[i]);
|
||||||
|
@ -195,8 +188,6 @@ static int apci3120_attach_pci(struct comedi_device *dev,
|
||||||
|
|
||||||
if (devpriv->ul_DmaBufferVirtual[1])
|
if (devpriv->ul_DmaBufferVirtual[1])
|
||||||
devpriv->b_DmaDoubleBuffer = 1;
|
devpriv->b_DmaDoubleBuffer = 1;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
n_subdevices = 7;
|
n_subdevices = 7;
|
||||||
ret = comedi_alloc_subdevices(dev, n_subdevices);
|
ret = comedi_alloc_subdevices(dev, n_subdevices);
|
||||||
|
|
Loading…
Reference in New Issue