[PATCH 12/24] staging: comedi: addi_apci_3200: remove i_APCI3120_InsnConfigDigitalOutput()

[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_apci3120.c      | 31 ----------------------
 drivers/staging/comedi/drivers/addi_apci_3120.c    |  3 ---
 2 files changed, 34 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index 106b286..0bc4eda 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -242,8 +242,6 @@ static const struct comedi_lrange range_apci3120_ao = {
 };
 
 
-static unsigned int ui_Temp;
-
 /* FUNCTION DEFINITIONS */
 
 /*
@@ -2201,35 +2199,6 @@ static int apci3120_di_insn_bits(struct comedi_device *dev,
 	return insn->n;
 }
 
-/*
- * Configure the output memory ON or OFF
- */
-static int i_APCI3120_InsnConfigDigitalOutput(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]) {
-		devpriv->b_OutputMemoryStatus = APCI3120_ENABLE;
-
-	} else {
-		devpriv->b_OutputMemoryStatus = APCI3120_DISABLE;
-		devpriv->b_DigitalOutputRegister = 0;
-	}
-	if (!devpriv->b_OutputMemoryStatus)
-		ui_Temp = 0;
-				/* if(!devpriv->b_OutputMemoryStatus ) */
-
-	return insn->n;
-}
-
 static int apci3120_do_insn_bits(struct comedi_device *dev,
 				 struct comedi_subdevice *s,
 				 struct comedi_insn *insn,
diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c
index 1326a2e..f65f827 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -191,9 +191,6 @@ static int apci3120_attach_pci(struct comedi_device *dev,
 	s->len_chanlist = this_board->i_NbrDoChannel;
 	s->range_table = &range_digital;
 	s->io_bits = 0xf;	/* all bits output */
-
-	/* insn_config - for digital output memory */
-	s->insn_config = i_APCI3120_InsnConfigDigitalOutput;
 	s->insn_bits = apci3120_do_insn_bits;
 
 	/*  Allocate and Initialise Timer Subdevice Structures */
-- 
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