For insn_read and insn_write handlers for the EEPROM and calibration subdevices currently assume that insn->n is 1 and access data[0] without checking insn->n. data[0] exists because the Comedi core ensures it, but in the case of the insn_write handler it will contain some random, uninitialized value. These patches change the handlers to follow the usual Comedi conventions. 1) staging: comedi: ni_mio_common: Use insn->n in ni_calib_insn_write() 2) staging: comedi: ni_mio_common: use insn->n in ni_calib_insn_read() 3) staging: comedi: ni_mio_common: use insn->n in ni_eeprom_insn_read() 4) staging: comedi: ni_mio_common: use insn->n in ni_m_series_eeprom_insn_read() drivers/staging/comedi/drivers/ni_mio_common.c | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel