[PATCH v2 09/24] staging: comedi: addi_apci_3200: remove i_APCI3200_ConfigDigitalOutput()

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

 



The digital outputs of the board supported by this driver are not
configurable. This driver abuses the comedi API and uses the 'insn_config'
function of the digital output subdevice to enable/disable writing to
the eeprom on the board. Remove this function.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 .../comedi/drivers/addi-data/hwdrv_apci3200.c      | 27 ----------------------
 drivers/staging/comedi/drivers/addi_apci_3200.c    |  2 --
 2 files changed, 29 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 1c2f26d..829af18 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -621,33 +621,6 @@ static int apci3200_di_insn_bits(struct comedi_device *dev,
 	return insn->n;
 }
 
-/*
- * Configures The Digital Output Subdevice.
- *
- * data[0] = 1  Memory enable
- *	   = 0  Memory Disable
- */
-static int i_APCI3200_ConfigDigitalOutput(struct comedi_device *dev,
-					  struct comedi_subdevice *s,
-					  struct comedi_insn *insn,
-					  unsigned int *data)
-{
-	struct addi_private *devpriv = dev->private;
-
-	if ((data[0] != 0) && (data[0] != 1)) {
-		comedi_error(dev,
-			"Not a valid Data !!! ,Data should be 1 or 0\n");
-		return -EINVAL;
-	}			/* if  ( (data[0]!=0) && (data[0]!=1) ) */
-	if (data[0]) {
-		devpriv->b_OutputMemoryStatus = ADDIDATA_ENABLE;
-	}			/*  if  (data[0]) */
-	else {
-		devpriv->b_OutputMemoryStatus = ADDIDATA_DISABLE;
-	}			/* else if  (data[0]) */
-	return insn->n;
-}
-
 static int apci3200_do_insn_bits(struct comedi_device *dev,
 				 struct comedi_subdevice *s,
 				 struct comedi_insn *insn,
diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c
index 890877f..ee527a7 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3200.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3200.c
@@ -50,7 +50,6 @@ static const struct addi_board apci3200_boardtypes[] = {
 		.ai_cmd			= i_APCI3200_CommandAnalogInput,
 		.ai_cancel		= i_APCI3200_StopCyclicAcquisition,
 		.di_bits		= apci3200_di_insn_bits,
-		.do_config		= i_APCI3200_ConfigDigitalOutput,
 		.do_bits		= apci3200_do_insn_bits,
 	}, {
 		.pc_DriverName		= "apci3300",
@@ -80,7 +79,6 @@ static const struct addi_board apci3200_boardtypes[] = {
 		.ai_cmd			= i_APCI3200_CommandAnalogInput,
 		.ai_cancel		= i_APCI3200_StopCyclicAcquisition,
 		.di_bits		= apci3200_di_insn_bits,
-		.do_config		= i_APCI3200_ConfigDigitalOutput,
 		.do_bits		= apci3200_do_insn_bits,
 	},
 };
-- 
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