Commit adda9ab0 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: vmk80xx: rename 'boardinfo' variables

For aesthetics, rename the 'boardinfo' variables to 'board'. That name
is more commonly used for the boardinfo pointer in comedi drivers.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 476f62eb
...@@ -700,7 +700,7 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev) ...@@ -700,7 +700,7 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
static int vmk80xx_init_subdevices(struct comedi_device *dev) 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 vmk80xx_private *devpriv = dev->private;
struct comedi_subdevice *s; struct comedi_subdevice *s;
int n_subd; int n_subd;
...@@ -722,18 +722,18 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -722,18 +722,18 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
s = &dev->subdevices[0]; s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI; s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND; s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = boardinfo->ai_nchans; s->n_chan = board->ai_nchans;
s->maxdata = boardinfo->ai_maxdata; s->maxdata = board->ai_maxdata;
s->range_table = boardinfo->range; s->range_table = board->range;
s->insn_read = vmk80xx_ai_insn_read; s->insn_read = vmk80xx_ai_insn_read;
/* Analog output subdevice */ /* Analog output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = boardinfo->ao_nchans; s->n_chan = board->ao_nchans;
s->maxdata = 0x00ff; s->maxdata = 0x00ff;
s->range_table = boardinfo->range; s->range_table = board->range;
s->insn_write = vmk80xx_ao_insn_write; s->insn_write = vmk80xx_ao_insn_write;
if (devpriv->model == VMK8061_MODEL) { if (devpriv->model == VMK8061_MODEL) {
s->subdev_flags |= SDF_READABLE; s->subdev_flags |= SDF_READABLE;
...@@ -744,7 +744,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -744,7 +744,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = boardinfo->di_nchans; s->n_chan = board->di_nchans;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = vmk80xx_di_insn_bits; s->insn_bits = vmk80xx_di_insn_bits;
...@@ -763,7 +763,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -763,7 +763,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
s->type = COMEDI_SUBD_COUNTER; s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = boardinfo->cnt_maxdata; s->maxdata = board->cnt_maxdata;
s->insn_read = vmk80xx_cnt_insn_read; s->insn_read = vmk80xx_cnt_insn_read;
s->insn_config = vmk80xx_cnt_insn_config; s->insn_config = vmk80xx_cnt_insn_config;
if (devpriv->model == VMK8055_MODEL) { if (devpriv->model == VMK8055_MODEL) {
...@@ -776,8 +776,8 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -776,8 +776,8 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
s = &dev->subdevices[5]; s = &dev->subdevices[5];
s->type = COMEDI_SUBD_PWM; s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE; s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = boardinfo->pwm_nchans; s->n_chan = board->pwm_nchans;
s->maxdata = boardinfo->pwm_maxdata; s->maxdata = board->pwm_maxdata;
s->insn_read = vmk80xx_pwm_insn_read; s->insn_read = vmk80xx_pwm_insn_read;
s->insn_write = vmk80xx_pwm_insn_write; s->insn_write = vmk80xx_pwm_insn_write;
} }
...@@ -791,19 +791,19 @@ static int vmk80xx_auto_attach(struct comedi_device *dev, ...@@ -791,19 +791,19 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,
unsigned long context) unsigned long context)
{ {
struct usb_interface *intf = comedi_to_usb_interface(dev); struct usb_interface *intf = comedi_to_usb_interface(dev);
const struct vmk80xx_board *boardinfo; const struct vmk80xx_board *board = NULL;
struct vmk80xx_private *devpriv; struct vmk80xx_private *devpriv;
int ret; int ret;
boardinfo = &vmk80xx_boardinfo[context]; board = &vmk80xx_boardinfo[context];
dev->board_ptr = boardinfo; dev->board_ptr = board;
dev->board_name = boardinfo->name; dev->board_name = board->name;
devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
if (!devpriv) if (!devpriv)
return -ENOMEM; return -ENOMEM;
devpriv->model = boardinfo->model; devpriv->model = board->model;
ret = vmk80xx_find_usb_endpoints(dev); ret = vmk80xx_find_usb_endpoints(dev);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment