bug fix for async write and read
authorYi-Shin Li <ysli@araisrobo.com>
Sun, 11 Jul 2010 15:08:11 +0000 (23:08 +0800)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 14 Jul 2010 07:42:17 +0000 (09:42 +0200)
commit90ef163e06dc90aebca58b8e4c99946392e37152
treeabf792ce531e08bfd9eb67cc71d423e5ffa7de32
parent82610092f71ea930e93a41d6b7741dc7dc4480db
bug fix for async write and read

* In ftdi_write_data_cb(), the tc->offset should be accumulated with
  transfer->actual_length.

* In ftdi_transfer_data_done(), the tc->transfer could be NULL if
  "(size <= ftdi->readbuffer_remaining)" at ftdi_read_data_submit().
  Therefore, has to check if it's NULL before accessing it.
src/ftdi.c