dev->n_subdevices = num_subdevices;
for (i = 0; i < num_subdevices; ++i) {
- s = dev->subdevices + i;
+ s = &dev->subdevices[i];
s->device = dev;
s->async_dma_dir = DMA_NONE;
spin_lock_init(&s->spin_lock);
if (dev->subdevices) {
for (i = 0; i < dev->n_subdevices; i++) {
- s = dev->subdevices + i;
+ s = &dev->subdevices[i];
comedi_free_subdevice_minor(s);
if (s->async) {
comedi_buf_alloc(dev, s, 0);
int ret;
for (i = 0; i < dev->n_subdevices; i++) {
- s = dev->subdevices + i;
+ s = &dev->subdevices[i];
if (s->type == COMEDI_SUBD_UNUSED)
continue;