Hi Dan,

Shouldn't this be:
                int chan = CR_CHAN(insn->chanspec);
indeed. It should. Thanks for pointing it out.

Where does the "+ 1" come from?  Couldn't this lead to an off by one
because comedi_check_chanlist() checks that "chan" is within bounds
but not "chan + 1".
The first byte codes the command which is returned from the USBDUX. So the received size is number of channels + 1. I return the command byte to be able to check that the right command has been executed in the firmware.

Regards,
/Bernd


  1737          up(&this_usbduxsub->sem);
  1738          return 1;
  1739  }

regards,
dan carpenter


--
www:    http://www.linux-usb-daq.co.uk/
        http://www.berndporr.me.uk/
        http://www.imdb.com/name/nm3293421/
Mobile: +44 (0)7840 340069
Work:   +44 (0)141 330 5237
        University of Glasgow
        School of Engineering
        72 Oakfield Avenue (Rankine Building for deliveries)
        Glasgow, G12 8LT
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to