staging: comedi: cb_pcidas: fix cb_pcidas_eeprom_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 14 Oct 2015 00:47:57 +0000 (17:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 06:20:10 +0000 (23:20 -0700)
commit16ded01b69b10d09659e61f0703979c63dcd385f
tree4066689303203e33236216537d2171d887f654b1
parent73d38effd10b8e399790aa67d6eace855f2d81ce
staging: comedi: cb_pcidas: fix cb_pcidas_eeprom_insn_read()

The comedi core expects (*insn_read) operations to return insn->n
data values. Refactor this function to work like the core expects.

For aesthetics, nvram_read() and use the comedi_timeout() helper
to handle the busy wait for the eeprom to be "ready".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_pcidas.c