提交 711b888e 编写于 作者: C Chase Southwood 提交者: Greg Kroah-Hartman

Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

There were some conditional blocks that had an unnecessary level of
indentation in them.  We can remove this to improve code clarity.
Signed-off-by: NChase Southwood <chase.southwood@yahoo.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 85b3842b
...@@ -207,23 +207,22 @@ static int i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, ...@@ -207,23 +207,22 @@ static int i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev,
ui_Command = ui_Command =
(ui_Command & 0xFFF719E2UL) | ui_Mode << 13UL | 0x10UL; (ui_Command & 0xFFF719E2UL) | ui_Mode << 13UL | 0x10UL;
} else { } else if (data[0] == ADDIDATA_WATCHDOG) {
if (data[0] == ADDIDATA_WATCHDOG) {
/* Set the mode : */ /* Set the mode : */
/* - Disable the hardware */ /* - Disable the hardware */
/* - Disable the counter mode */ /* - Disable the counter mode */
/* - Disable the warning */ /* - Disable the warning */
/* - Disable the reset */ /* - Disable the reset */
/* - Disable the timer mode */ /* - Disable the timer mode */
ui_Command = ui_Command & 0xFFF819E2UL; ui_Command = ui_Command & 0xFFF819E2UL;
} else { } else {
dev_err(dev->class_dev, "The parameter for Timer/watchdog selection is in error\n"); dev_err(dev->class_dev, "The parameter for Timer/watchdog selection is in error\n");
return -EINVAL; return -EINVAL;
}
} }
outl(ui_Command, devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12); outl(ui_Command, devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
ui_Command = 0; ui_Command = 0;
ui_Command = inl(devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12); ui_Command = inl(devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
...@@ -626,11 +625,9 @@ static void v_APCI035_Interrupt(int irq, void *d) ...@@ -626,11 +625,9 @@ static void v_APCI035_Interrupt(int irq, void *d)
/* Read the digital temperature value */ /* Read the digital temperature value */
ui_DigitalTemperature = inl(devpriv->iobase + 128 + 60); ui_DigitalTemperature = inl(devpriv->iobase + 128 + 60);
send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */ send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
}
else { } else if ((ui_StatusRegister2 & 0x1) == 0x1) {
if ((ui_StatusRegister2 & 0x1) == 0x1) send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
} }
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册