static int vmk80xx_init_subdevices(struct comedi_device *dev)
{
- const struct vmk80xx_board *boardinfo = dev->board_ptr;
+ const struct vmk80xx_board *board = dev->board_ptr;
struct vmk80xx_private *devpriv = dev->private;
struct comedi_subdevice *s;
int n_subd;
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
- s->n_chan = boardinfo->ai_nchans;
- s->maxdata = boardinfo->ai_maxdata;
- s->range_table = boardinfo->range;
+ s->n_chan = board->ai_nchans;
+ s->maxdata = board->ai_maxdata;
+ s->range_table = board->range;
s->insn_read = vmk80xx_ai_insn_read;
/* Analog output subdevice */
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
- s->n_chan = boardinfo->ao_nchans;
+ s->n_chan = board->ao_nchans;
s->maxdata = 0x00ff;
- s->range_table = boardinfo->range;
+ s->range_table = board->range;
s->insn_write = vmk80xx_ao_insn_write;
if (devpriv->model == VMK8061_MODEL) {
s->subdev_flags |= SDF_READABLE;
s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
- s->n_chan = boardinfo->di_nchans;
+ s->n_chan = board->di_nchans;
s->maxdata = 1;
s->range_table = &range_digital;
s->insn_bits = vmk80xx_di_insn_bits;
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE;
s->n_chan = 2;
- s->maxdata = boardinfo->cnt_maxdata;
+ s->maxdata = board->cnt_maxdata;
s->insn_read = vmk80xx_cnt_insn_read;
s->insn_config = vmk80xx_cnt_insn_config;
if (devpriv->model == VMK8055_MODEL) {
s = &dev->subdevices[5];
s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
- s->n_chan = boardinfo->pwm_nchans;
- s->maxdata = boardinfo->pwm_maxdata;
+ s->n_chan = board->pwm_nchans;
+ s->maxdata = board->pwm_maxdata;
s->insn_read = vmk80xx_pwm_insn_read;
s->insn_write = vmk80xx_pwm_insn_write;
}
unsigned long context)
{
struct usb_interface *intf = comedi_to_usb_interface(dev);
- const struct vmk80xx_board *boardinfo;
+ const struct vmk80xx_board *board = NULL;
struct vmk80xx_private *devpriv;
int ret;
- boardinfo = &vmk80xx_boardinfo[context];
- dev->board_ptr = boardinfo;
- dev->board_name = boardinfo->name;
+ board = &vmk80xx_boardinfo[context];
+ dev->board_ptr = board;
+ dev->board_name = board->name;
devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
if (!devpriv)
return -ENOMEM;
- devpriv->model = boardinfo->model;
+ devpriv->model = board->model;
ret = vmk80xx_find_usb_endpoints(dev);
if (ret)