staging: comedi: drivers: remove inappropriate SDF_* flags from subdevices
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 30 Oct 2014 18:19:35 +0000 (11:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:30:04 +0000 (16:30 -0800)
The SDF_GROUND, SDF_COMMON, SDF_DIFF, and SDF_OTHER flags are only useful
with the analog input and output subdevices.

Remove these flags from the other subdevice types in the comedi drivers.

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_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_3501.c
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/adv_pci_dio.c
drivers/staging/comedi/drivers/dyna_pci10xx.c
drivers/staging/comedi/drivers/icp_multi.c

index d43129c9fda02d5b84bab4074f878fb2da1547c6..30b132c3d09207d6e54340fcf2d4e62add19fa4e 100644 (file)
@@ -54,7 +54,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
        /*  Allocate and Initialise DI Subdevice Structures */
        s = &dev->subdevices[0];
        s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_READABLE;
        s->n_chan = 16;
        s->maxdata = 1;
        s->range_table = &range_digital;
@@ -66,7 +66,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
        /*  Allocate and Initialise DO Subdevice Structures */
        s = &dev->subdevices[1];
        s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
        s->n_chan = 16;
        s->maxdata = 1;
        s->range_table = &range_digital;
@@ -77,7 +77,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
        /*  Allocate and Initialise Timer Subdevice Structures */
        s = &dev->subdevices[2];
        s->type = COMEDI_SUBD_TIMER;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITABLE;
        s->n_chan = 1;
        s->maxdata = 0;
        s->len_chanlist = 1;
index 992ac8ddbe643736597e987bfdac6bc50f4fad75..79245236be78255c7b3d35c5735b3d69784f6e8e 100644 (file)
@@ -392,7 +392,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
        /* Initialize the timer/watchdog subdevice */
        s = &dev->subdevices[3];
        s->type = COMEDI_SUBD_TIMER;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITABLE;
        s->n_chan = 1;
        s->maxdata = 0;
        s->len_chanlist = 1;
index c5422f3769274c1797034d30c237548389b8f09f..e05f4b5444e16bc32534271370a2f3bb3f25aaf5 100644 (file)
@@ -1210,7 +1210,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
        if (this_board->n_dichan) {
                s = &dev->subdevices[subdev];
                s->type = COMEDI_SUBD_DI;
-               s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
+               s->subdev_flags = SDF_READABLE;
                s->n_chan = this_board->n_dichan;
                s->maxdata = 1;
                s->len_chanlist = this_board->n_dichan;
@@ -1222,7 +1222,7 @@ static int pci1710_auto_attach(struct comedi_device *dev,
        if (this_board->n_dochan) {
                s = &dev->subdevices[subdev];
                s->type = COMEDI_SUBD_DO;
-               s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+               s->subdev_flags = SDF_WRITABLE;
                s->n_chan = this_board->n_dochan;
                s->maxdata = 1;
                s->len_chanlist = this_board->n_dochan;
index f2e2d7e163bf6d77e9bf1049f94fd4da13f42d73..09609d6d02da283210493b9c25ed981ccd693e88 100644 (file)
@@ -930,7 +930,7 @@ static int pci1760_attach(struct comedi_device *dev)
 
        s = &dev->subdevices[0];
        s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_READABLE;
        s->n_chan = 8;
        s->maxdata = 1;
        s->len_chanlist = 8;
@@ -939,7 +939,7 @@ static int pci1760_attach(struct comedi_device *dev)
 
        s = &dev->subdevices[1];
        s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITABLE;
        s->n_chan = 8;
        s->maxdata = 1;
        s->len_chanlist = 8;
@@ -978,7 +978,7 @@ static int pci_dio_add_di(struct comedi_device *dev,
        const struct dio_boardtype *this_board = dev->board_ptr;
 
        s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON | d->specflags;
+       s->subdev_flags = SDF_READABLE | d->specflags;
        if (d->chans > 16)
                s->subdev_flags |= SDF_LSAMPL;
        s->n_chan = d->chans;
@@ -1008,7 +1008,7 @@ static int pci_dio_add_do(struct comedi_device *dev,
        const struct dio_boardtype *this_board = dev->board_ptr;
 
        s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITABLE;
        if (d->chans > 16)
                s->subdev_flags |= SDF_LSAMPL;
        s->n_chan = d->chans;
index 608aee0c3a15dfae3ba870f61ba398641fd5f9e5..1b6324c6eb291ee46a8d0394cbf9506502594d4d 100644 (file)
@@ -218,7 +218,7 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
        /* digital input */
        s = &dev->subdevices[2];
        s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND;
+       s->subdev_flags = SDF_READABLE;
        s->n_chan = 16;
        s->maxdata = 1;
        s->range_table = &range_digital;
@@ -228,7 +228,7 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
        /* digital output */
        s = &dev->subdevices[3];
        s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
+       s->subdev_flags = SDF_WRITABLE;
        s->n_chan = 16;
        s->maxdata = 1;
        s->range_table = &range_digital;
index f4e1c1cf4178ff2ffc5ef397981fe12a249046ea..f9aa6a59c9a8b9adcb50b53919d921e328393524 100644 (file)
@@ -521,7 +521,7 @@ static int icp_multi_auto_attach(struct comedi_device *dev,
 
        s = &dev->subdevices[4];
        s->type = COMEDI_SUBD_COUNTER;
-       s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITABLE;
        s->n_chan = 4;
        s->maxdata = 0xffff;
        s->len_chanlist = 4;