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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
476f62eb16
Коммит
adda9ab042
|
@ -700,7 +700,7 @@ static int vmk80xx_alloc_usb_buffers(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 comedi_subdevice *s;
|
||||
int n_subd;
|
||||
|
@ -722,18 +722,18 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
|||
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;
|
||||
|
@ -744,7 +744,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
|||
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;
|
||||
|
@ -763,7 +763,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
|||
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) {
|
||||
|
@ -776,8 +776,8 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
|||
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;
|
||||
}
|
||||
|
@ -791,19 +791,19 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,
|
|||
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче