diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-11-30 01:19:25 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-30 02:05:30 (GMT) |
commit | 7b5dd1cc988cf34341319c81bb0c7ddc21a2f8ee (patch) | |
tree | 555e5ca9e948a4f4513017b2a06931e6d33d3529 /drivers/staging | |
parent | 7180eb30deee6c05b8924348a7ac7d4deefcf56e (diff) | |
download | linux-7b5dd1cc988cf34341319c81bb0c7ddc21a2f8ee.tar.xz |
staging: comedi: addi_apci_2032: fix i_APCI2032_ReadWatchdog()
This function is used by the watchdog subdevice to read the status of
the watchdog. Rename the CamelCase function to apci2032_wdog_insn_read
and fix the function to return the status value insn->n times like
the comedi core expects.
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/addi_apci_2032.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index b77a84a..537e029 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -156,12 +156,16 @@ static int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, return insn->n; } -static int i_APCI2032_ReadWatchdog(struct comedi_device *dev, +static int apci1516_wdog_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { - data[0] = inl(dev->iobase + APCI2032_WDOG_STATUS_REG) & 0x1; + int i; + + for (i = 0; i < insn->n; i++) + data[i] = inl(dev->iobase + APCI2032_WDOG_STATUS_REG); + return insn->n; } @@ -268,7 +272,7 @@ static int apci2032_auto_attach(struct comedi_device *dev, s->len_chanlist = 1; s->range_table = &range_digital; s->insn_write = i_APCI2032_StartStopWriteWatchdog; - s->insn_read = i_APCI2032_ReadWatchdog; + s->insn_read = apci1516_wdog_insn_read; s->insn_config = i_APCI2032_ConfigWatchdog; apci2032_reset(dev); |