staging: comedi: addi_apci_1516: fix i_APCI1516_StartStopWriteWatchdog()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 13 Nov 2012 20:47:27 +0000 (13:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 23:12:55 +0000 (15:12 -0800)
commit0ff1fa77687052ff36aa141317c45f737057ce5d
tree63f4c8f86e1b5d4da1aca458a81cb7b016e6226c
parent158b64973e7854cddefb1f56c3758ed8382f2bc8
staging: comedi: addi_apci_1516: fix i_APCI1516_StartStopWriteWatchdog()

This function is used by the watchdog subdevice to "ping" the watchdog.
Rename the CamelCase function to apci1516_wdog_insn_write.

Currently this function does not follow the comed API. INSN_WRITE functions
are supposed to write insn->n values. Also, starting and stopping the
watchdog is handled by the INSN_CONFIG function.

Fix this function so it works like the comedi core expects. Also, since
the watchdog needs to be enabled in order to "ping" it, make sure it is
enabled before writing to it.

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>
drivers/staging/comedi/drivers/addi_apci_1516.c