if (board->di_nchan) {
nchan = min(board->di_nchan, 32);
- s = dev->subdevices + subdev;
+ s = &dev->subdevices[subdev];
/* Isolated digital inputs 0 to 15/31 */
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
nchan = board->di_nchan - nchan;
if (nchan) {
- s = dev->subdevices + subdev;
+ s = &dev->subdevices[subdev];
/* Isolated digital inputs 32 to 63 */
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
if (board->do_nchan) {
nchan = min(board->do_nchan, 32);
- s = dev->subdevices + subdev;
+ s = &dev->subdevices[subdev];
/* Isolated digital outputs 0 to 15/31 */
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE;
nchan = board->do_nchan - nchan;
if (nchan) {
- s = dev->subdevices + subdev;
+ s = &dev->subdevices[subdev];
/* Isolated digital outputs 32 to 63 */
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE;