Convert the comedi_subdevice access from pointer match to array access. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/s626.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index c2bb223..9f4a3ba 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2647,7 +2647,7 @@ static int s626_auto_attach(struct comedi_device *dev, if (ret) return ret; - s = dev->subdevices + 0; + s = &dev->subdevices[0]; /* analog input subdevice */ dev->read_subdev = s; /* we support single-ended (ground) and differential */ @@ -2663,7 +2663,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->do_cmdtest = s626_ai_cmdtest; s->cancel = s626_ai_cancel; - s = dev->subdevices + 1; + s = &dev->subdevices[1]; /* analog output subdevice */ s->type = COMEDI_SUBD_AO; s->subdev_flags = SDF_WRITABLE | SDF_READABLE; @@ -2673,7 +2673,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->insn_write = s626_ao_winsn; s->insn_read = s626_ao_rinsn; - s = dev->subdevices + 2; + s = &dev->subdevices[2]; /* digital I/O subdevice */ s->type = COMEDI_SUBD_DIO; s->subdev_flags = SDF_WRITABLE | SDF_READABLE; @@ -2685,7 +2685,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->insn_config = s626_dio_insn_config; s->insn_bits = s626_dio_insn_bits; - s = dev->subdevices + 3; + s = &dev->subdevices[3]; /* digital I/O subdevice */ s->type = COMEDI_SUBD_DIO; s->subdev_flags = SDF_WRITABLE | SDF_READABLE; @@ -2697,7 +2697,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->insn_config = s626_dio_insn_config; s->insn_bits = s626_dio_insn_bits; - s = dev->subdevices + 4; + s = &dev->subdevices[4]; /* digital I/O subdevice */ s->type = COMEDI_SUBD_DIO; s->subdev_flags = SDF_WRITABLE | SDF_READABLE; @@ -2709,7 +2709,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->insn_config = s626_dio_insn_config; s->insn_bits = s626_dio_insn_bits; - s = dev->subdevices + 5; + s = &dev->subdevices[5]; /* encoder (counter) subdevice */ s->type = COMEDI_SUBD_COUNTER; s->subdev_flags = SDF_WRITABLE | SDF_READABLE | SDF_LSAMPL; -- 1.8.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel