staging: comedi: addi_apci_3xxx: remove COMEDI_SUBD_TTLIO
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 12 Jun 2013 23:11:03 +0000 (16:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2013 21:33:40 +0000 (14:33 -0700)
This driver abuses the enum comedi_subdevice_type by redefining
enum 11 - COMEDI_SUBD_SERIAL as COMEDI_SUBD_TTLIO. The subdevice
that uses COMEDI_SUBD_TTLIO is a TTL Digital Input/Output subdevice.

Remove COMEDI_SUBD_TTLIO and just use COMEDI_SUBD_DIO as the
subdevice type.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
drivers/staging/comedi/drivers/addi_apci_3xxx.c

index 8ce552e..372b45b 100644 (file)
@@ -40,10 +40,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
   +----------+-----------+------------------------------------------------+
 */
 
-#ifndef COMEDI_SUBD_TTLIO
-#define COMEDI_SUBD_TTLIO      11      /* Digital Input Output But TTL */
-#endif
-
 #define APCI3XXX_SINGLE                                0
 #define APCI3XXX_DIFF                          1
 #define APCI3XXX_CONFIGURATION                 0
index 1380919..3cdfa10 100644 (file)
@@ -6,10 +6,6 @@
 #include "comedi_fc.h"
 #include "amcc_s5933.h"
 
-#ifndef COMEDI_SUBD_TTLIO
-#define COMEDI_SUBD_TTLIO   11 /* Digital Input Output But TTL */
-#endif
-
 static const struct comedi_lrange apci3xxx_ai_range = {
        8, {
                BIP_RANGE(10),
@@ -618,7 +614,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
        /*  Allocate and Initialise TTL */
        s = &dev->subdevices[5];
        if (board->i_NbrTTLChannel) {
-               s->type = COMEDI_SUBD_TTLIO;
+               s->type = COMEDI_SUBD_DIO;
                s->subdev_flags =
                        SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
                s->n_chan = board->i_NbrTTLChannel;