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

staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in apci3501_config_insn_timer()

Rename this CamelCase local variable.

For aesthetics, split the mask/set operations.
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 f7f909e0
...@@ -22,7 +22,7 @@ static int apci3501_config_insn_timer(struct comedi_device *dev, ...@@ -22,7 +22,7 @@ static int apci3501_config_insn_timer(struct comedi_device *dev,
unsigned int *data) unsigned int *data)
{ {
struct apci3501_private *devpriv = dev->private; struct apci3501_private *devpriv = dev->private;
unsigned int ul_Command1 = 0; unsigned int ctrl = 0;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
if (data[0] == ADDIDATA_WATCHDOG) { if (data[0] == ADDIDATA_WATCHDOG) {
...@@ -43,15 +43,16 @@ static int apci3501_config_insn_timer(struct comedi_device *dev, ...@@ -43,15 +43,16 @@ static int apci3501_config_insn_timer(struct comedi_device *dev,
outl(data[3], dev->iobase + APCI3501_TIMER_RELOAD_REG); outl(data[3], dev->iobase + APCI3501_TIMER_RELOAD_REG);
/* Set the mode (e2->e0) */ /* Set the mode (e2->e0) */
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG) | 0xFFF819E0UL; ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl |= 0xfff819e0;
outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} }
else if (data[0] == ADDIDATA_TIMER) { else if (data[0] == ADDIDATA_TIMER) {
/* First Stop The Timer */ /* First Stop The Timer */
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = ul_Command1 & 0xFFFFF9FEUL; ctrl &= 0xfffff9fe;
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
devpriv->timer_mode = ADDIDATA_TIMER; devpriv->timer_mode = ADDIDATA_TIMER;
if (data[1] == 1) { if (data[1] == 1) {
/* Enable TIMER int & DISABLE ALL THE OTHER int SOURCES */ /* Enable TIMER int & DISABLE ALL THE OTHER int SOURCES */
...@@ -65,10 +66,10 @@ static int apci3501_config_insn_timer(struct comedi_device *dev, ...@@ -65,10 +66,10 @@ static int apci3501_config_insn_timer(struct comedi_device *dev,
outl(data[3], dev->iobase + APCI3501_TIMER_RELOAD_REG); outl(data[3], dev->iobase + APCI3501_TIMER_RELOAD_REG);
/* mode 2 */ /* mode 2 */
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = ctrl &= 0xfff719e2;
(ul_Command1 & 0xFFF719E2UL) | 2UL << 13UL | 0x10UL; ctrl |= (2 << 13) | 0x10;
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} }
return insn->n; return insn->n;
......
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