[PATCH 20/29] staging: comedi: addi_apci_1032: remove i_APCI1032_Read1DigitalInput()

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

 



This function is the insn_read operation for the digital input subdevice.
This operation can be emulated by the comedi core now that the insn_bits
operation follows the comedi API. Remove this now unnecessary 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_apci1032.c      | 43 ----------------------
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  1 -
 2 files changed, 44 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
index aa4f022..be35776 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
@@ -138,49 +138,6 @@ static int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev,
 
 /*
 +----------------------------------------------------------------------------+
-| Function   Name   : int i_APCI1032_Read1DigitalInput                       |
-|			  (struct comedi_device *dev,struct comedi_subdevice *s,               |
-|                      struct comedi_insn *insn,unsigned int *data)                     |
-+----------------------------------------------------------------------------+
-| Task              : Return the status of the digital input                 |
-+----------------------------------------------------------------------------+
-| Input Parameters  : struct comedi_device *dev      : Driver handle                |
-|		              unsigned int ui_Channel : Channel number to read       |
-|                     unsigned int *data          : Data Pointer to read status  |
-+----------------------------------------------------------------------------+
-| Output Parameters :	--													 |
-+----------------------------------------------------------------------------+
-| Return Value      : TRUE  : No error occur                                 |
-|		            : FALSE : Error occur. Return the error          |
-|			                                                         |
-+----------------------------------------------------------------------------+
-*/
-static int i_APCI1032_Read1DigitalInput(struct comedi_device *dev,
-					struct comedi_subdevice *s,
-					struct comedi_insn *insn,
-					unsigned int *data)
-{
-	unsigned int ui_TmpValue = 0;
-	unsigned int ui_Channel;
-	ui_Channel = CR_CHAN(insn->chanspec);
-
-	if (ui_Channel <= 31) {
-		ui_TmpValue = inl(dev->iobase + APCI1032_DI_REG);
-/*
-* since only 1 channel reqd to bring it to last bit it is rotated 8
-* +(chan - 1) times then ANDed with 1 for last bit.
-*/
-		*data = (ui_TmpValue >> ui_Channel) & 0x1;
-	}			/* if(ui_Channel >= 0 && ui_Channel <=31) */
-	else {
-		/* comedi_error(dev," \n chan spec wrong\n"); */
-		return -EINVAL;	/*  "sorry channel spec wrong " */
-	}			/* else if(ui_Channel >= 0 && ui_Channel <=31) */
-	return insn->n;
-}
-
-/*
-+----------------------------------------------------------------------------+
 | Function   Name   : int i_APCI1032_ReadMoreDigitalInput                    |
 |			  (struct comedi_device *dev,struct comedi_subdevice *s,               |
 |                     struct comedi_insn *insn,unsigned int *data)                      |
diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c
index 717e122..77e78df 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1032.c
@@ -74,7 +74,6 @@ static int apci1032_attach_pci(struct comedi_device *dev,
 	s->len_chanlist	= 32;
 	s->range_table	= &range_digital;
 	s->insn_config	= i_APCI1032_ConfigDigitalInput;
-	s->insn_read	= i_APCI1032_Read1DigitalInput;
 	s->insn_bits	= i_APCI1032_ReadMoreDigitalInput;
 
 	/*  Allocate and Initialise DO 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