aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-05 21:59:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 23:06:32 -0400
commitd3d1e2532f33b49515bf9ea9e2b4cc1dbb1d47c9 (patch)
tree32fc94ccda7c85f386a5d0f36eb88631e4cbedc0
parentae4498216be8ed2ecd1508a72458a01e6976185a (diff)
staging: comedi: vmk80xx: remove subdevice pointer math
Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/vmk80xx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 94010fc05905..f9fef26db3aa 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1119,7 +1119,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1119 return ret; 1119 return ret;
1120 } 1120 }
1121 /* Analog input subdevice */ 1121 /* Analog input subdevice */
1122 s = cdev->subdevices + VMK80XX_SUBD_AI; 1122 s = &cdev->subdevices[VMK80XX_SUBD_AI];
1123 s->type = COMEDI_SUBD_AI; 1123 s->type = COMEDI_SUBD_AI;
1124 s->subdev_flags = SDF_READABLE | SDF_GROUND; 1124 s->subdev_flags = SDF_READABLE | SDF_GROUND;
1125 s->n_chan = dev->board.ai_chans; 1125 s->n_chan = dev->board.ai_chans;
@@ -1127,7 +1127,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1127 s->range_table = dev->board.range; 1127 s->range_table = dev->board.range;
1128 s->insn_read = vmk80xx_ai_rinsn; 1128 s->insn_read = vmk80xx_ai_rinsn;
1129 /* Analog output subdevice */ 1129 /* Analog output subdevice */
1130 s = cdev->subdevices + VMK80XX_SUBD_AO; 1130 s = &cdev->subdevices[VMK80XX_SUBD_AO];
1131 s->type = COMEDI_SUBD_AO; 1131 s->type = COMEDI_SUBD_AO;
1132 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND; 1132 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
1133 s->n_chan = dev->board.ao_chans; 1133 s->n_chan = dev->board.ao_chans;
@@ -1139,7 +1139,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1139 s->insn_read = vmk80xx_ao_rinsn; 1139 s->insn_read = vmk80xx_ao_rinsn;
1140 } 1140 }
1141 /* Digital input subdevice */ 1141 /* Digital input subdevice */
1142 s = cdev->subdevices + VMK80XX_SUBD_DI; 1142 s = &cdev->subdevices[VMK80XX_SUBD_DI];
1143 s->type = COMEDI_SUBD_DI; 1143 s->type = COMEDI_SUBD_DI;
1144 s->subdev_flags = SDF_READABLE | SDF_GROUND; 1144 s->subdev_flags = SDF_READABLE | SDF_GROUND;
1145 s->n_chan = dev->board.di_chans; 1145 s->n_chan = dev->board.di_chans;
@@ -1147,7 +1147,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1147 s->insn_read = vmk80xx_di_rinsn; 1147 s->insn_read = vmk80xx_di_rinsn;
1148 s->insn_bits = vmk80xx_di_bits; 1148 s->insn_bits = vmk80xx_di_bits;
1149 /* Digital output subdevice */ 1149 /* Digital output subdevice */
1150 s = cdev->subdevices + VMK80XX_SUBD_DO; 1150 s = &cdev->subdevices[VMK80XX_SUBD_DO];
1151 s->type = COMEDI_SUBD_DO; 1151 s->type = COMEDI_SUBD_DO;
1152 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND; 1152 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
1153 s->n_chan = dev->board.do_chans; 1153 s->n_chan = dev->board.do_chans;
@@ -1159,7 +1159,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1159 s->insn_read = vmk80xx_do_rinsn; 1159 s->insn_read = vmk80xx_do_rinsn;
1160 } 1160 }
1161 /* Counter subdevice */ 1161 /* Counter subdevice */
1162 s = cdev->subdevices + VMK80XX_SUBD_CNT; 1162 s = &cdev->subdevices[VMK80XX_SUBD_CNT];
1163 s->type = COMEDI_SUBD_COUNTER; 1163 s->type = COMEDI_SUBD_COUNTER;
1164 s->subdev_flags = SDF_READABLE; 1164 s->subdev_flags = SDF_READABLE;
1165 s->n_chan = dev->board.cnt_chans; 1165 s->n_chan = dev->board.cnt_chans;
@@ -1172,7 +1172,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
1172 } 1172 }
1173 /* PWM subdevice */ 1173 /* PWM subdevice */
1174 if (dev->board.model == VMK8061_MODEL) { 1174 if (dev->board.model == VMK8061_MODEL) {
1175 s = cdev->subdevices + VMK80XX_SUBD_PWM; 1175 s = &cdev->subdevices[VMK80XX_SUBD_PWM];
1176 s->type = COMEDI_SUBD_PWM; 1176 s->type = COMEDI_SUBD_PWM;
1177 s->subdev_flags = SDF_READABLE | SDF_WRITEABLE; 1177 s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
1178 s->n_chan = dev->board.pwm_chans; 1178 s->n_chan = dev->board.pwm_chans;