[PATCH 09/18] staging: comedi: addi-data: remove attach option to disable dma

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

 



This pci driver currently uses the comedi legacy attach mechanism
which allows the user to pass configuration options to the driver
when it is attached to the comedi subsystem. The use of these
configuration options is preventing the conversion of the addi-data
drivers to the comedi auto attach mechanism.

For the addi-data drivers, option[2] is used to enable/disable dma.
The default (0) action is to enable dma is the driver supports it.

Remove this configuration option and just enable dma if it is
supported.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi-data/addi_common.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c
index ae85f64..2dab403 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c
@@ -40,9 +40,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour
   |	option[0] - PCI bus number - if bus number and slot number are 0, |
   |			         then driver search for first unused card |
   |	option[1] - PCI slot number                                       |
-  |							                  |
-  |	option[2] = 0  - DMA ENABLE                                       |
-  |               = 1  - DMA DISABLE                                      |
   +----------+-----------+------------------------------------------------+
 */
 
@@ -94,7 +91,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	unsigned int dw_Dummy;
 	resource_size_t iobase_a, iobase_main, iobase_addon, iobase_reserved;
 	struct pcilst_struct *card = NULL;
-	int i_Dma = 0;
 
 	devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
 	if (!devpriv)
@@ -106,10 +102,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		pci_list_builded = 1;
 	}
 
-	if ((this_board->i_Dma) && (it->options[2] == 0)) {
-		i_Dma = 1;
-	}
-
 	card = ptr_select_and_alloc_pci_card(this_board->i_VendorId,
 					     this_board->i_DeviceId,
 					     it->options[0],
@@ -122,7 +114,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	ret = comedi_pci_enable(pcidev, "addi_amcc_s5933");
 	if (ret)
 		return ret;
-	if (i_Dma)
+	if (this_board->i_Dma)
 		pci_set_master(pcidev);
 	card->used = 1;
 	devpriv->allocated = 1;
-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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