[PATCH 25/26] staging: comedi: ni_labpc: rename local var 'thisboard'

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

 



For aesthetic reasons, rename the local variable 'thisboard' to
'board'.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_labpc.c     | 56 +++++++++++++--------------
 drivers/staging/comedi/drivers/ni_labpc_isa.c |  4 +-
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index b8e106a..2a2dd1d 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -269,7 +269,7 @@ static int labpc_ai_insn_read(struct comedi_device *dev,
 			      struct comedi_insn *insn,
 			      unsigned int *data)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv = dev->private;
 	int i, n;
 	int chan, range;
@@ -291,7 +291,7 @@ static int labpc_ai_insn_read(struct comedi_device *dev,
 	devpriv->cmd1 = 0;
 	chan = CR_CHAN(insn->chanspec);
 	range = CR_RANGE(insn->chanspec);
-	devpriv->cmd1 |= thisboard->ai_range_code[range];
+	devpriv->cmd1 |= board->ai_range_code[range];
 	/* munge channel bits for differential/scan disabled mode */
 	if (CR_AREF(insn->chanspec) == AREF_DIFF)
 		chan *= 2;
@@ -299,7 +299,7 @@ static int labpc_ai_insn_read(struct comedi_device *dev,
 	devpriv->write_byte(devpriv->cmd1, dev->iobase + COMMAND1_REG);
 
 	/* setup command6 register for 1200 boards */
-	if (thisboard->register_layout == labpc_1200_layout) {
+	if (board->register_layout == labpc_1200_layout) {
 		/*  reference inputs to ground or common? */
 		if (CR_AREF(insn->chanspec) != AREF_GROUND)
 			devpriv->cmd6 |= ADC_COMMON_BIT;
@@ -637,7 +637,7 @@ static int labpc_ai_chanlist_invalid(const struct comedi_device *dev,
 static int labpc_ai_cmdtest(struct comedi_device *dev,
 			    struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	int err = 0;
 	int tmp, tmp2;
 	unsigned int stop_mask;
@@ -652,7 +652,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,
 	err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
 
 	stop_mask = TRIG_COUNT | TRIG_NONE;
-	if (thisboard->register_layout == labpc_1200_layout)
+	if (board->register_layout == labpc_1200_layout)
 		stop_mask |= TRIG_EXT;
 	err |= cfc_check_trigger_src(&cmd->stop_src, stop_mask);
 
@@ -686,7 +686,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,
 
 	if (cmd->convert_src == TRIG_TIMER)
 		err |= cfc_check_trigger_arg_min(&cmd->convert_arg,
-						 thisboard->ai_speed);
+						 board->ai_speed);
 
 	/* make sure scan timing is not too fast */
 	if (cmd->scan_begin_src == TRIG_TIMER) {
@@ -694,7 +694,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,
 			err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg,
 					cmd->convert_arg * cmd->chanlist_len);
 		err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg,
-				thisboard->ai_speed * cmd->chanlist_len);
+				board->ai_speed * cmd->chanlist_len);
 	}
 
 	switch (cmd->stop_src) {
@@ -738,9 +738,9 @@ static inline int labpc_counter_load(struct comedi_device *dev,
 				     unsigned int counter_number,
 				     unsigned int count, unsigned int mode)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 
-	if (thisboard->has_mmio)
+	if (board->has_mmio)
 		return i8254_mm_load((void __iomem *)base_address, 0,
 				     counter_number, count, mode);
 	else
@@ -749,7 +749,7 @@ static inline int labpc_counter_load(struct comedi_device *dev,
 
 static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv = dev->private;
 	int channel, range, aref;
 #ifdef CONFIG_ISA_DMA_API
@@ -813,7 +813,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 	} else
 #endif
 	/* pc-plus has no fifo-half full interrupt */
-	if (thisboard->register_layout == labpc_1200_layout &&
+	if (board->register_layout == labpc_1200_layout &&
 		   /*  wake-end-of-scan should interrupt on fifo not empty */
 		   (cmd->flags & TRIG_WAKE_EOS) == 0 &&
 		   /*  make sure we are taking more than just a few points */
@@ -825,7 +825,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 	mode = labpc_ai_scan_mode(cmd);
 
 	/*  setup command6 register for 1200 boards */
-	if (thisboard->register_layout == labpc_1200_layout) {
+	if (board->register_layout == labpc_1200_layout) {
 		/*  reference inputs to ground or common? */
 		if (aref != AREF_GROUND)
 			devpriv->cmd6 |= ADC_COMMON_BIT;
@@ -866,7 +866,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 	    aref == AREF_DIFF)
 		channel *= 2;
 	devpriv->cmd1 |= ADC_CHAN_BITS(channel);
-	devpriv->cmd1 |= thisboard->ai_range_code[range];
+	devpriv->cmd1 |= board->ai_range_code[range];
 	devpriv->write_byte(devpriv->cmd1, dev->iobase + COMMAND1_REG);
 	/* manual says to set scan enable bit on second pass */
 	if (mode == MODE_MULT_CHAN_UP || mode == MODE_MULT_CHAN_DOWN) {
@@ -1148,7 +1148,7 @@ static void labpc_drain_dregs(struct comedi_device *dev)
 static irqreturn_t labpc_interrupt(int irq, void *d)
 {
 	struct comedi_device *dev = d;
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv = dev->private;
 	struct comedi_subdevice *s = dev->read_subdev;
 	struct comedi_async *async;
@@ -1165,7 +1165,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
 
 	/* read board status */
 	devpriv->stat1 = devpriv->read_byte(dev->iobase + STATUS1_REG);
-	if (thisboard->register_layout == labpc_1200_layout)
+	if (board->register_layout == labpc_1200_layout)
 		devpriv->stat2 = devpriv->read_byte(dev->iobase + STATUS2_REG);
 
 	if ((devpriv->stat1 & (DMATC_BIT | TIMER_BIT | OVERFLOW_BIT |
@@ -1191,7 +1191,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
 		 * has occurred
 		 */
 		if (devpriv->stat1 & DMATC_BIT ||
-		    (thisboard->register_layout == labpc_1200_layout
+		    (board->register_layout == labpc_1200_layout
 		     && devpriv->stat2 & A1_TC_BIT)) {
 			handle_isa_dma(dev);
 		}
@@ -1239,7 +1239,7 @@ static int labpc_ao_insn_write(struct comedi_device *dev,
 			       struct comedi_insn *insn,
 			       unsigned int *data)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv = dev->private;
 	int channel, range;
 	unsigned long flags;
@@ -1256,7 +1256,7 @@ static int labpc_ao_insn_write(struct comedi_device *dev,
 	spin_unlock_irqrestore(&dev->spinlock, flags);
 
 	/* set range */
-	if (thisboard->register_layout == labpc_1200_layout) {
+	if (board->register_layout == labpc_1200_layout) {
 		range = CR_RANGE(insn->chanspec);
 		if (labpc_range_is_unipolar(s, range))
 			devpriv->cmd6 |= DAC_UNIP_BIT(channel);
@@ -1563,14 +1563,14 @@ static int labpc_eeprom_insn_read(struct comedi_device *dev,
 int labpc_common_attach(struct comedi_device *dev,
 			unsigned int irq, unsigned long irq_flags)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv = dev->private;
 	struct comedi_subdevice *s;
 	int subdev;
 	int i;
 	int ret;
 
-	if (thisboard->has_mmio) {
+	if (board->has_mmio) {
 		devpriv->read_byte = labpc_readb;
 		devpriv->write_byte = labpc_writeb;
 	} else {
@@ -1582,7 +1582,7 @@ int labpc_common_attach(struct comedi_device *dev,
 	devpriv->write_byte(devpriv->cmd2, dev->iobase + COMMAND2_REG);
 	devpriv->write_byte(devpriv->cmd3, dev->iobase + COMMAND3_REG);
 	devpriv->write_byte(devpriv->cmd4, dev->iobase + COMMAND4_REG);
-	if (thisboard->register_layout == labpc_1200_layout) {
+	if (board->register_layout == labpc_1200_layout) {
 		devpriv->write_byte(devpriv->cmd5, dev->iobase + COMMAND5_REG);
 		devpriv->write_byte(devpriv->cmd6, dev->iobase + COMMAND6_REG);
 	}
@@ -1597,9 +1597,9 @@ int labpc_common_attach(struct comedi_device *dev,
 
 	/* Only allocate the subdevices needed */
 	subdev = 1 +			/* all boards have ai */
-		 thisboard->has_ao +	/* only on some boards have ao */
+		 board->has_ao +	/* only on some boards have ao */
 		 1 +			/* all boards have 8255 dio */
-		 (thisboard->register_layout == labpc_1200_layout)
+		 (board->register_layout == labpc_1200_layout)
 		 ? 2 : 0;		/* the calib and memory devices */
 	ret = comedi_alloc_subdevices(dev, subdev);
 	if (ret)
@@ -1614,7 +1614,7 @@ int labpc_common_attach(struct comedi_device *dev,
 	s->n_chan	= 8;
 	s->len_chanlist	= 8;
 	s->maxdata	= 0x0fff;
-	s->range_table	= thisboard->ai_range_table;
+	s->range_table	= board->ai_range_table;
 	s->insn_read	= labpc_ai_insn_read;
 	if (dev->irq) {
 		dev->read_subdev = s;
@@ -1624,7 +1624,7 @@ int labpc_common_attach(struct comedi_device *dev,
 		s->cancel	= labpc_cancel;
 	}
 
-	if (thisboard->has_ao) {
+	if (board->has_ao) {
 		/* analog output subdevice */
 		s = &dev->subdevices[subdev++];
 		s->type		= COMEDI_SUBD_AO;
@@ -1649,14 +1649,14 @@ int labpc_common_attach(struct comedi_device *dev,
 
 	/* 8255 dio */
 	s = &dev->subdevices[subdev++];
-	if (thisboard->has_mmio)
+	if (board->has_mmio)
 	ret = subdev_8255_init(dev, s,
-			       (thisboard->has_mmio) ? labpc_8255_mmio : NULL,
+			       (board->has_mmio) ? labpc_8255_mmio : NULL,
 			       dev->iobase + DIO_BASE_REG);
 	if (ret)
 		return ret;
 
-	if (thisboard->register_layout == labpc_1200_layout) {
+	if (board->register_layout == labpc_1200_layout) {
 		/* calibration subdevice */
 		s = &dev->subdevices[subdev++];
 		s->type		= COMEDI_SUBD_CALIB;
diff --git a/drivers/staging/comedi/drivers/ni_labpc_isa.c b/drivers/staging/comedi/drivers/ni_labpc_isa.c
index b2660c6..afea65f 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_isa.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_isa.c
@@ -104,7 +104,7 @@ static const struct labpc_boardinfo labpc_boards[] = {
 
 static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
-	const struct labpc_boardinfo *thisboard = comedi_board(dev);
+	const struct labpc_boardinfo *board = comedi_board(dev);
 	struct labpc_private *devpriv;
 	unsigned long iobase = it->options[0];
 	unsigned int irq = it->options[1];
@@ -112,7 +112,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	unsigned long dma_flags;
 	int ret;
 
-	dev->board_name = thisboard->name;
+	dev->board_name = board->name;
 
 	if (!request_region(iobase, LABPC_SIZE, dev->board_name))
 		return -EIO;
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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