staging: comedi: das800: rename 'thisboard' variables

For aesthetics, rename the 'thisboard' 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:
H Hartley Sweeten 2015-06-18 10:54:48 -07:00 committed by Greg Kroah-Hartman
parent a69153f66f
commit 4f3aa186d3

View file

@ -240,13 +240,13 @@ static unsigned das800_ind_read(struct comedi_device *dev, unsigned reg)
static void das800_enable(struct comedi_device *dev) static void das800_enable(struct comedi_device *dev)
{ {
const struct das800_board *thisboard = dev->board_ptr; const struct das800_board *board = dev->board_ptr;
struct das800_private *devpriv = dev->private; struct das800_private *devpriv = dev->private;
unsigned long irq_flags; unsigned long irq_flags;
spin_lock_irqsave(&dev->spinlock, irq_flags); spin_lock_irqsave(&dev->spinlock, irq_flags);
/* enable fifo-half full interrupts for cio-das802/16 */ /* enable fifo-half full interrupts for cio-das802/16 */
if (thisboard->resolution == 16) if (board->resolution == 16)
outb(CIO_ENHF, dev->iobase + DAS800_GAIN); outb(CIO_ENHF, dev->iobase + DAS800_GAIN);
/* enable hardware triggering */ /* enable hardware triggering */
das800_ind_write(dev, CONV_HCEN, CONV_CONTROL); das800_ind_write(dev, CONV_HCEN, CONV_CONTROL);
@ -303,7 +303,7 @@ static int das800_ai_do_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
struct comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
const struct das800_board *thisboard = dev->board_ptr; const struct das800_board *board = dev->board_ptr;
int err = 0; int err = 0;
/* Step 1 : check if triggers are trivially valid */ /* Step 1 : check if triggers are trivially valid */
@ -335,7 +335,7 @@ static int das800_ai_do_cmdtest(struct comedi_device *dev,
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,
thisboard->ai_speed); board->ai_speed);
} }
err |= comedi_check_trigger_arg_min(&cmd->chanlist_len, 1); err |= comedi_check_trigger_arg_min(&cmd->chanlist_len, 1);
@ -375,7 +375,7 @@ static int das800_ai_do_cmdtest(struct comedi_device *dev,
static int das800_ai_do_cmd(struct comedi_device *dev, static int das800_ai_do_cmd(struct comedi_device *dev,
struct comedi_subdevice *s) struct comedi_subdevice *s)
{ {
const struct das800_board *thisboard = dev->board_ptr; const struct das800_board *board = dev->board_ptr;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
struct comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int gain = CR_RANGE(cmd->chanlist[0]); unsigned int gain = CR_RANGE(cmd->chanlist[0]);
@ -393,7 +393,7 @@ static int das800_ai_do_cmd(struct comedi_device *dev,
spin_unlock_irqrestore(&dev->spinlock, irq_flags); spin_unlock_irqrestore(&dev->spinlock, irq_flags);
/* set gain */ /* set gain */
if (thisboard->resolution == 12 && gain > 0) if (board->resolution == 12 && gain > 0)
gain += 0x7; gain += 0x7;
gain &= 0xf; gain &= 0xf;
outb(gain, dev->iobase + DAS800_GAIN); outb(gain, dev->iobase + DAS800_GAIN);
@ -606,8 +606,8 @@ static int das800_do_insn_bits(struct comedi_device *dev,
static const struct das800_board *das800_probe(struct comedi_device *dev) static const struct das800_board *das800_probe(struct comedi_device *dev)
{ {
const struct das800_board *thisboard = dev->board_ptr; const struct das800_board *board = dev->board_ptr;
int index = thisboard ? thisboard - das800_boards : -EINVAL; int index = board ? board - das800_boards : -EINVAL;
int id_bits; int id_bits;
unsigned long irq_flags; unsigned long irq_flags;
@ -628,18 +628,18 @@ static const struct das800_board *das800_probe(struct comedi_device *dev)
switch (id_bits) { switch (id_bits) {
case 0x0: case 0x0:
if (index == BOARD_DAS800 || index == BOARD_CIODAS800) if (index == BOARD_DAS800 || index == BOARD_CIODAS800)
return thisboard; return board;
index = BOARD_DAS800; index = BOARD_DAS800;
break; break;
case 0x2: case 0x2:
if (index == BOARD_DAS801 || index == BOARD_CIODAS801) if (index == BOARD_DAS801 || index == BOARD_CIODAS801)
return thisboard; return board;
index = BOARD_DAS801; index = BOARD_DAS801;
break; break;
case 0x3: case 0x3:
if (index == BOARD_DAS802 || index == BOARD_CIODAS802 || if (index == BOARD_DAS802 || index == BOARD_CIODAS802 ||
index == BOARD_CIODAS80216) index == BOARD_CIODAS80216)
return thisboard; return board;
index = BOARD_DAS802; index = BOARD_DAS802;
break; break;
default: default:
@ -655,7 +655,7 @@ static const struct das800_board *das800_probe(struct comedi_device *dev)
static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ {
const struct das800_board *thisboard; const struct das800_board *board;
struct das800_private *devpriv; struct das800_private *devpriv;
struct comedi_subdevice *s; struct comedi_subdevice *s;
unsigned int irq = it->options[1]; unsigned int irq = it->options[1];
@ -670,11 +670,11 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret) if (ret)
return ret; return ret;
thisboard = das800_probe(dev); board = das800_probe(dev);
if (!thisboard) if (!board)
return -ENODEV; return -ENODEV;
dev->board_ptr = thisboard; dev->board_ptr = board;
dev->board_name = thisboard->name; dev->board_name = board->name;
if (irq > 1 && irq <= 7) { if (irq > 1 && irq <= 7) {
ret = request_irq(irq, das800_interrupt, 0, dev->board_name, ret = request_irq(irq, das800_interrupt, 0, dev->board_name,
@ -698,8 +698,8 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
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 = 8; s->n_chan = 8;
s->maxdata = (1 << thisboard->resolution) - 1; s->maxdata = (1 << board->resolution) - 1;
s->range_table = thisboard->ai_range; s->range_table = board->ai_range;
s->insn_read = das800_ai_insn_read; s->insn_read = das800_ai_insn_read;
if (dev->irq) { if (dev->irq) {
s->subdev_flags |= SDF_CMD_READ; s->subdev_flags |= SDF_CMD_READ;