mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 10:46:02 +08:00
Bug fixes for BCH and TSC2007 drivers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3921 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -145,7 +145,9 @@ ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t le
|
||||
len -= nbytes;
|
||||
}
|
||||
|
||||
/* Then read all of the full sectors following the partial sector */
|
||||
/* Then read all of the full sectors following the partial sector directly
|
||||
* into the user buffer.
|
||||
*/
|
||||
|
||||
if (len >= bch->sectsize )
|
||||
{
|
||||
@@ -155,7 +157,8 @@ ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t le
|
||||
nsectors = bch->nsectors - sector;
|
||||
}
|
||||
|
||||
ret = bch->inode->u.i_bops->read(bch->inode, bch->buffer, sector, nsectors);
|
||||
ret = bch->inode->u.i_bops->read(bch->inode, (FAR uint8_t *)buffer,
|
||||
sector, nsectors);
|
||||
if (ret < 0)
|
||||
{
|
||||
fdbg("Read failed: %d\n");
|
||||
|
||||
Reference in New Issue
Block a user