summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-11-29 18:21:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-29 18:05:31 -0800
commitb3b7dab7580982a7d0b55395a8b116808447f85a (patch)
treea641f121eb83f75d78522fdf11217b4850300422
parent7c7c42cdf6b1968da6588de97c4978ce602b5d34 (diff)
downloadlinux-3.10-b3b7dab7580982a7d0b55395a8b116808447f85a.tar.gz
linux-3.10-b3b7dab7580982a7d0b55395a8b116808447f85a.tar.bz2
linux-3.10-b3b7dab7580982a7d0b55395a8b116808447f85a.zip
staging: comedi: addi_apci_2032: move i_APCI2032_ConfigDigitalOutput()
For aesthetic reasons, move this function. This function has nothing to do with the digital outputs. It's used to enable the interrupt sources that the board can generate. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_2032.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c
index da0c8ca05ea..4fb380ad213 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -60,35 +60,6 @@ struct apci2032_private {
unsigned int wdog_ctrl;
};
-static int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev,
- struct comedi_subdevice *s,
- struct comedi_insn *insn,
- unsigned int *data)
-{
- unsigned int ul_Command = 0;
-
- if ((data[0] != 0) && (data[0] != 1)) {
- comedi_error(dev,
- "Not a valid Data !!! ,Data should be 1 or 0\n");
- return -EINVAL;
- }
-
- if (data[1] == 1)
- ul_Command |= APCI2032_INT_CTRL_VCC_ENA;
- else
- ul_Command &= ~APCI2032_INT_CTRL_VCC_ENA;
-
- if (data[2] == 1)
- ul_Command |= APCI2032_INT_CTRL_CC_ENA;
- else
- ul_Command &= ~APCI2032_INT_CTRL_CC_ENA;
-
- outl(ul_Command, dev->iobase + APCI2032_INT_CTRL_REG);
- ui_InterruptData = inl(dev->iobase + APCI2032_INT_CTRL_REG);
-
- return insn->n;
-}
-
static int apci2032_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
@@ -185,6 +156,35 @@ static int apci2032_wdog_insn_read(struct comedi_device *dev,
return insn->n;
}
+static int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
+{
+ unsigned int ul_Command = 0;
+
+ if ((data[0] != 0) && (data[0] != 1)) {
+ comedi_error(dev,
+ "Not a valid Data !!! ,Data should be 1 or 0\n");
+ return -EINVAL;
+ }
+
+ if (data[1] == 1)
+ ul_Command |= APCI2032_INT_CTRL_VCC_ENA;
+ else
+ ul_Command &= ~APCI2032_INT_CTRL_VCC_ENA;
+
+ if (data[2] == 1)
+ ul_Command |= APCI2032_INT_CTRL_CC_ENA;
+ else
+ ul_Command &= ~APCI2032_INT_CTRL_CC_ENA;
+
+ outl(ul_Command, dev->iobase + APCI2032_INT_CTRL_REG);
+ ui_InterruptData = inl(dev->iobase + APCI2032_INT_CTRL_REG);
+
+ return insn->n;
+}
+
static int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,