[PATCH 18/22] staging: comedi: dt3000: rename 'this_board' variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/dt3000.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index 031282c..8c4f284 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -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,
 			   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;
 	unsigned int arg;
 
@@ -424,14 +424,14 @@ static int dt3k_ai_cmdtest(struct comedi_device *dev,
 
 	if (cmd->scan_begin_src == TRIG_TIMER) {
 		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,
 						    100 * 16 * 65535);
 	}
 
 	if (cmd->convert_src == TRIG_TIMER) {
 		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,
 						    50 * 16 * 65535);
 	}
@@ -635,17 +635,17 @@ static int dt3000_auto_attach(struct comedi_device *dev,
 			      unsigned long context)
 {
 	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 comedi_subdevice *s;
 	int ret = 0;
 
 	if (context < ARRAY_SIZE(dt3k_boardtypes))
-		this_board = &dt3k_boardtypes[context];
-	if (!this_board)
+		board = &dt3k_boardtypes[context];
+	if (!board)
 		return -ENODEV;
-	dev->board_ptr = this_board;
-	dev->board_name = this_board->name;
+	dev->board_ptr = board;
+	dev->board_name = board->name;
 
 	devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
 	if (!devpriv)
@@ -674,9 +674,9 @@ static int dt3000_auto_attach(struct comedi_device *dev,
 	/* ai subdevice */
 	s->type		= COMEDI_SUBD_AI;
 	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->maxdata	= (1 << this_board->adbits) - 1;
+	s->maxdata	= (1 << board->adbits) - 1;
 	s->range_table	= &range_dt3000_ai;	/* XXX */
 	if (dev->irq) {
 		dev->read_subdev = s;
@@ -692,7 +692,7 @@ static int dt3000_auto_attach(struct comedi_device *dev,
 	s->type		= COMEDI_SUBD_AO;
 	s->subdev_flags	= SDF_WRITABLE;
 	s->n_chan	= 2;
-	s->maxdata	= (1 << this_board->dabits) - 1;
+	s->maxdata	= (1 << board->dabits) - 1;
 	s->len_chanlist	= 1;
 	s->range_table	= &range_bipolar10;
 	s->insn_write	= dt3k_ao_insn_write;
-- 
2.4.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux