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

staging: comedi: hwdrv_apci3501: rename 'ul_Command1' in apci3501_write_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 4434a99e
...@@ -92,43 +92,45 @@ static int apci3501_write_insn_timer(struct comedi_device *dev, ...@@ -92,43 +92,45 @@ static int apci3501_write_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;
if (devpriv->timer_mode == ADDIDATA_WATCHDOG) { if (devpriv->timer_mode == ADDIDATA_WATCHDOG) {
if (data[1] == 1) { if (data[1] == 1) {
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x1UL; ctrl &= 0xfffff9ff;
ctrl |= 0x1;
/* Enable the Watchdog */ /* Enable the Watchdog */
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} else if (data[1] == 0) { /* Stop The Watchdog */ } else if (data[1] == 0) { /* Stop The Watchdog */
outl(0x0, dev->iobase + APCI3501_TIMER_CTRL_REG); outl(0x0, dev->iobase + APCI3501_TIMER_CTRL_REG);
} else if (data[1] == 2) { } else if (data[1] == 2) {
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x200UL; ctrl &= 0xfffff9ff;
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl |= 0x200;
outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} }
} }
if (devpriv->timer_mode == ADDIDATA_TIMER) { if (devpriv->timer_mode == ADDIDATA_TIMER) {
if (data[1] == 1) { if (data[1] == 1) {
ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl &= 0xfffff9ff;
ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x1UL; ctrl |= 0x1;
/* Enable the Timer */ /* Enable the Timer */
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} else if (data[1] == 0) { } else if (data[1] == 0) {
/* Stop The Timer */ /* 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);
} }
else if (data[1] == 2) { else if (data[1] == 2) {
/* Trigger the Timer */ /* Trigger the Timer */
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x200UL; ctrl &= 0xfffff9ff;
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); ctrl |= 0x200;
outl(ctrl, dev->iobase + APCI3501_TIMER_CTRL_REG);
} }
} }
......
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