]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: addi_apci_2016: remove i_APCI2016_ConfigDigitalOutput()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 17:09:04 +0000 (10:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:21:39 +0000 (11:21 -0800)
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@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c
drivers/staging/comedi/drivers/addi_apci_2016.c

index 14c6a3096aa4d5dd82aaa6c0ecc8494d52db7f6b..c1a58398266b74a1a244db4d5776954c3caf821c 100644 (file)
@@ -63,49 +63,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour
 #define APCI2016_WATCHDOG_RELOAD_VALUE 4
 #define APCI2016_WATCHDOG_STATUS       16
 
-/*
-+----------------------------------------------------------------------------+
-| Function   Name   : int i_APCI2016_ConfigDigitalOutput                     |
-|                        (struct comedi_device *dev,struct comedi_subdevice *s,               |
-|                      struct comedi_insn *insn,unsigned int *data)                     |
-+----------------------------------------------------------------------------+
-| Task              : Configures The Digital Output Subdevice.               |
-+----------------------------------------------------------------------------+
-| Input Parameters  : struct comedi_device *dev : Driver handle                     |
-|                     unsigned int *data         : Data Pointer contains             |
-|                                          configuration parameters as below |
-|                                                                            |
-|                        data[0]            : 1 Digital Memory On               |
-|                                                         0 Digital Memory Off              |
-+----------------------------------------------------------------------------+
-| Output Parameters :  --                                                                                                       |
-+----------------------------------------------------------------------------+
-| Return Value      : TRUE  : No error occur                                 |
-|                          : FALSE : Error occur. Return the error          |
-|                                                                               |
-+----------------------------------------------------------------------------+
-*/
-static int i_APCI2016_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 apci2016_do_insn_bits(struct comedi_device *dev,
                                 struct comedi_subdevice *s,
                                 struct comedi_insn *insn,
index a792012bfe999780e274808f40cd127e05878073..e9431f8cebad96d5e04b4293fbcdc3b73c5cf507 100644 (file)
@@ -21,7 +21,6 @@ static const struct addi_board apci2016_boardtypes[] = {
                .i_NbrDoChannel         = 16,
                .i_Timer                = 1,
                .reset                  = i_APCI2016_Reset,
-               .do_config              = i_APCI2016_ConfigDigitalOutput,
                .do_bits                = apci2016_do_insn_bits,
                .timer_config           = i_APCI2016_ConfigWatchdog,
                .timer_write            = i_APCI2016_StartStopWriteWatchdog,