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

staging: comedi: dt3000: rename 'this_board' variables

For aesthetics, rename the 'this_board' 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 1a127f31
...@@ -400,7 +400,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec, ...@@ -400,7 +400,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
static int dt3k_ai_cmdtest(struct comedi_device *dev, static int dt3k_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd) struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ {
const struct dt3k_boardtype *this_board = dev->board_ptr; const struct dt3k_boardtype *board = dev->board_ptr;
int err = 0; int err = 0;
unsigned int arg; unsigned int arg;
...@@ -424,14 +424,14 @@ static int dt3k_ai_cmdtest(struct comedi_device *dev, ...@@ -424,14 +424,14 @@ static int dt3k_ai_cmdtest(struct comedi_device *dev,
if (cmd->scan_begin_src == TRIG_TIMER) { if (cmd->scan_begin_src == TRIG_TIMER) {
err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,
this_board->ai_speed); board->ai_speed);
err |= comedi_check_trigger_arg_max(&cmd->scan_begin_arg, err |= comedi_check_trigger_arg_max(&cmd->scan_begin_arg,
100 * 16 * 65535); 100 * 16 * 65535);
} }
if (cmd->convert_src == TRIG_TIMER) { if (cmd->convert_src == TRIG_TIMER) {
err |= comedi_check_trigger_arg_min(&cmd->convert_arg, err |= comedi_check_trigger_arg_min(&cmd->convert_arg,
this_board->ai_speed); board->ai_speed);
err |= comedi_check_trigger_arg_max(&cmd->convert_arg, err |= comedi_check_trigger_arg_max(&cmd->convert_arg,
50 * 16 * 65535); 50 * 16 * 65535);
} }
...@@ -635,17 +635,17 @@ static int dt3000_auto_attach(struct comedi_device *dev, ...@@ -635,17 +635,17 @@ static int dt3000_auto_attach(struct comedi_device *dev,
unsigned long context) unsigned long context)
{ {
struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct dt3k_boardtype *this_board = NULL; const struct dt3k_boardtype *board = NULL;
struct dt3k_private *devpriv; struct dt3k_private *devpriv;
struct comedi_subdevice *s; struct comedi_subdevice *s;
int ret = 0; int ret = 0;
if (context < ARRAY_SIZE(dt3k_boardtypes)) if (context < ARRAY_SIZE(dt3k_boardtypes))
this_board = &dt3k_boardtypes[context]; board = &dt3k_boardtypes[context];
if (!this_board) if (!board)
return -ENODEV; return -ENODEV;
dev->board_ptr = this_board; dev->board_ptr = board;
dev->board_name = this_board->name; dev->board_name = board->name;
devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
if (!devpriv) if (!devpriv)
...@@ -674,9 +674,9 @@ static int dt3000_auto_attach(struct comedi_device *dev, ...@@ -674,9 +674,9 @@ static int dt3000_auto_attach(struct comedi_device *dev,
/* ai subdevice */ /* ai subdevice */
s->type = COMEDI_SUBD_AI; s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF; s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
s->n_chan = this_board->adchan; s->n_chan = board->adchan;
s->insn_read = dt3k_ai_insn; s->insn_read = dt3k_ai_insn;
s->maxdata = (1 << this_board->adbits) - 1; s->maxdata = (1 << board->adbits) - 1;
s->range_table = &range_dt3000_ai; /* XXX */ s->range_table = &range_dt3000_ai; /* XXX */
if (dev->irq) { if (dev->irq) {
dev->read_subdev = s; dev->read_subdev = s;
...@@ -692,7 +692,7 @@ static int dt3000_auto_attach(struct comedi_device *dev, ...@@ -692,7 +692,7 @@ static int dt3000_auto_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = (1 << this_board->dabits) - 1; s->maxdata = (1 << board->dabits) - 1;
s->len_chanlist = 1; s->len_chanlist = 1;
s->range_table = &range_bipolar10; s->range_table = &range_bipolar10;
s->insn_write = dt3k_ao_insn_write; s->insn_write = dt3k_ao_insn_write;
......
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