diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-29 16:07:29 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-29 16:07:29 +0000 |
commit | 3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb (patch) | |
tree | 071f95f8219d83fc1992dcbb5eb5c2b9e2cc782c /nuttx/drivers/bch/bchlib_read.c | |
parent | 0671167e2a192d26fd43efa2130c4fccc32b76b8 (diff) | |
download | px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.tar.gz px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.tar.bz2 px4-nuttx-3000e30c53c6e1b4dcbd7c2efe9d7bba551b23fb.zip |
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
Diffstat (limited to 'nuttx/drivers/bch/bchlib_read.c')
-rw-r--r-- | nuttx/drivers/bch/bchlib_read.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nuttx/drivers/bch/bchlib_read.c b/nuttx/drivers/bch/bchlib_read.c index 7319e3412..e146f02f8 100644 --- a/nuttx/drivers/bch/bchlib_read.c +++ b/nuttx/drivers/bch/bchlib_read.c @@ -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"); |