From e00259182063cccbcee85315d978b8b93d5298e3 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 30 Oct 2014 11:19:35 -0700 Subject: [PATCH] staging: comedi: drivers: remove inappropriate SDF_* flags from subdevices 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1500.c | 6 +++--- drivers/staging/comedi/drivers/addi_apci_3501.c | 2 +- drivers/staging/comedi/drivers/adv_pci1710.c | 4 ++-- drivers/staging/comedi/drivers/adv_pci_dio.c | 8 ++++---- drivers/staging/comedi/drivers/dyna_pci10xx.c | 4 ++-- drivers/staging/comedi/drivers/icp_multi.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index d43129c9fda0..30b132c3d092 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -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; diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 992ac8ddbe64..79245236be78 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -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; diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index c5422f376927..e05f4b5444e1 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -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; diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c index f2e2d7e163bf..09609d6d02da 100644 --- a/drivers/staging/comedi/drivers/adv_pci_dio.c +++ b/drivers/staging/comedi/drivers/adv_pci_dio.c @@ -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; diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 608aee0c3a15..1b6324c6eb29 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -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; diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index f4e1c1cf4178..f9aa6a59c9a8 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -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; -- 2.20.1