Commit 1b39406b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: dyna_pci10xx: remove subdevice pointer math

Convert the comedi_subdevice access from pointer math to array
access.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a207891
...@@ -208,7 +208,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev, ...@@ -208,7 +208,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
return ret; return ret;
/* analog input */ /* analog input */
s = dev->subdevices + 0; s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI; s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF; s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
s->n_chan = 16; s->n_chan = 16;
...@@ -218,7 +218,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev, ...@@ -218,7 +218,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
s->insn_read = dyna_pci10xx_insn_read_ai; s->insn_read = dyna_pci10xx_insn_read_ai;
/* analog output */ /* analog output */
s = dev->subdevices + 1; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 16; s->n_chan = 16;
...@@ -228,7 +228,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev, ...@@ -228,7 +228,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
s->insn_write = dyna_pci10xx_insn_write_ao; s->insn_write = dyna_pci10xx_insn_write_ao;
/* digital input */ /* digital input */
s = dev->subdevices + 2; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE | SDF_GROUND; s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = 16; s->n_chan = 16;
...@@ -238,7 +238,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev, ...@@ -238,7 +238,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
s->insn_bits = dyna_pci10xx_di_insn_bits; s->insn_bits = dyna_pci10xx_di_insn_bits;
/* digital output */ /* digital output */
s = dev->subdevices + 3; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = 16; s->n_chan = 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment