diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-06-18 13:54:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-19 00:19:01 -0400 |
commit | 94be3ef2a8ddcf3e97b2f598ada2c701fcec41fc (patch) | |
tree | 8dacad00451bb14c8a4861af7f56284d509f70a7 /drivers/staging | |
parent | 30f23066424f8fc46e56f41195c51b33fdf36f58 (diff) |
staging: comedi: ni_at_a2150: 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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_at_a2150.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 1cd4869d3286..9b444f8c4e33 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c | |||
@@ -264,7 +264,7 @@ static int a2150_cancel(struct comedi_device *dev, struct comedi_subdevice *s) | |||
264 | static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, | 264 | static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, |
265 | unsigned int flags) | 265 | unsigned int flags) |
266 | { | 266 | { |
267 | const struct a2150_board *thisboard = dev->board_ptr; | 267 | const struct a2150_board *board = dev->board_ptr; |
268 | struct a2150_private *devpriv = dev->private; | 268 | struct a2150_private *devpriv = dev->private; |
269 | int lub, glb, temp; | 269 | int lub, glb, temp; |
270 | int lub_divisor_shift, lub_index, glb_divisor_shift, glb_index; | 270 | int lub_divisor_shift, lub_index, glb_divisor_shift, glb_index; |
@@ -273,10 +273,10 @@ static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, | |||
273 | /* initialize greatest lower and least upper bounds */ | 273 | /* initialize greatest lower and least upper bounds */ |
274 | lub_divisor_shift = 3; | 274 | lub_divisor_shift = 3; |
275 | lub_index = 0; | 275 | lub_index = 0; |
276 | lub = thisboard->clock[lub_index] * (1 << lub_divisor_shift); | 276 | lub = board->clock[lub_index] * (1 << lub_divisor_shift); |
277 | glb_divisor_shift = 0; | 277 | glb_divisor_shift = 0; |
278 | glb_index = thisboard->num_clocks - 1; | 278 | glb_index = board->num_clocks - 1; |
279 | glb = thisboard->clock[glb_index] * (1 << glb_divisor_shift); | 279 | glb = board->clock[glb_index] * (1 << glb_divisor_shift); |
280 | 280 | ||
281 | /* make sure period is in available range */ | 281 | /* make sure period is in available range */ |
282 | if (*period < glb) | 282 | if (*period < glb) |
@@ -287,9 +287,9 @@ static int a2150_get_timing(struct comedi_device *dev, unsigned int *period, | |||
287 | /* we can multiply period by 1, 2, 4, or 8, using (1 << i) */ | 287 | /* we can multiply period by 1, 2, 4, or 8, using (1 << i) */ |
288 | for (i = 0; i < 4; i++) { | 288 | for (i = 0; i < 4; i++) { |
289 | /* there are a maximum of 4 master clocks */ | 289 | /* there are a maximum of 4 master clocks */ |
290 | for (j = 0; j < thisboard->num_clocks; j++) { | 290 | for (j = 0; j < board->num_clocks; j++) { |
291 | /* temp is the period in nanosec we are evaluating */ | 291 | /* temp is the period in nanosec we are evaluating */ |
292 | temp = thisboard->clock[j] * (1 << i); | 292 | temp = board->clock[j] * (1 << i); |
293 | /* if it is the best match yet */ | 293 | /* if it is the best match yet */ |
294 | if (temp < lub && temp >= *period) { | 294 | if (temp < lub && temp >= *period) { |
295 | lub_divisor_shift = i; | 295 | lub_divisor_shift = i; |
@@ -413,7 +413,7 @@ static int a2150_ai_check_chanlist(struct comedi_device *dev, | |||
413 | static int a2150_ai_cmdtest(struct comedi_device *dev, | 413 | static int a2150_ai_cmdtest(struct comedi_device *dev, |
414 | struct comedi_subdevice *s, struct comedi_cmd *cmd) | 414 | struct comedi_subdevice *s, struct comedi_cmd *cmd) |
415 | { | 415 | { |
416 | const struct a2150_board *thisboard = dev->board_ptr; | 416 | const struct a2150_board *board = dev->board_ptr; |
417 | int err = 0; | 417 | int err = 0; |
418 | unsigned int arg; | 418 | unsigned int arg; |
419 | 419 | ||
@@ -444,7 +444,7 @@ static int a2150_ai_cmdtest(struct comedi_device *dev, | |||
444 | 444 | ||
445 | if (cmd->convert_src == TRIG_TIMER) { | 445 | if (cmd->convert_src == TRIG_TIMER) { |
446 | err |= comedi_check_trigger_arg_min(&cmd->convert_arg, | 446 | err |= comedi_check_trigger_arg_min(&cmd->convert_arg, |
447 | thisboard->ai_speed); | 447 | board->ai_speed); |
448 | } | 448 | } |
449 | 449 | ||
450 | err |= comedi_check_trigger_arg_min(&cmd->chanlist_len, 1); | 450 | err |= comedi_check_trigger_arg_min(&cmd->chanlist_len, 1); |
@@ -699,7 +699,7 @@ static const struct a2150_board *a2150_probe(struct comedi_device *dev) | |||
699 | 699 | ||
700 | static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it) | 700 | static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it) |
701 | { | 701 | { |
702 | const struct a2150_board *thisboard; | 702 | const struct a2150_board *board; |
703 | struct a2150_private *devpriv; | 703 | struct a2150_private *devpriv; |
704 | struct comedi_subdevice *s; | 704 | struct comedi_subdevice *s; |
705 | static const int timeout = 2000; | 705 | static const int timeout = 2000; |
@@ -714,11 +714,11 @@ static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
714 | if (ret) | 714 | if (ret) |
715 | return ret; | 715 | return ret; |
716 | 716 | ||
717 | thisboard = a2150_probe(dev); | 717 | board = a2150_probe(dev); |
718 | if (!thisboard) | 718 | if (!board) |
719 | return -ENODEV; | 719 | return -ENODEV; |
720 | dev->board_ptr = thisboard; | 720 | dev->board_ptr = board; |
721 | dev->board_name = thisboard->name; | 721 | dev->board_name = board->name; |
722 | 722 | ||
723 | /* an IRQ and DMA are required to support async commands */ | 723 | /* an IRQ and DMA are required to support async commands */ |
724 | a2150_alloc_irq_and_dma(dev, it); | 724 | a2150_alloc_irq_and_dma(dev, it); |