summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-04 07:28:12 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-04 07:28:12 -0600
commita073daaceb598bb5e5053b2c759512bc913cb8d0 (patch)
tree8f339a3f35088640f15310a3d87051f9f3e0f104
parentf3d89a7cb7d702da8aaeee6afbcdffac236fb976 (diff)
downloadnuttx-a073daaceb598bb5e5053b2c759512bc913cb8d0.tar.gz
nuttx-a073daaceb598bb5e5053b2c759512bc913cb8d0.tar.bz2
nuttx-a073daaceb598bb5e5053b2c759512bc913cb8d0.zip
SMARTFS: Increase some variables from uint16_t to uint32_t to handle larger device sizes. From Ken Pettit
-rw-r--r--nuttx/drivers/mtd/smart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/drivers/mtd/smart.c b/nuttx/drivers/mtd/smart.c
index ea1fe387d..002a9fe5d 100644
--- a/nuttx/drivers/mtd/smart.c
+++ b/nuttx/drivers/mtd/smart.c
@@ -572,7 +572,7 @@ static ssize_t smart_bytewrite(struct smart_struct_s *dev, size_t offset,
{
/* Perform block-based read-modify-write */
- uint16_t startblock;
+ uint32_t startblock;
uint16_t nblocks;
/* First calculate the start block and number of blocks affected */
@@ -1462,7 +1462,7 @@ static inline int smart_writesector(struct smart_struct_s *dev, unsigned long ar
int ret;
uint16_t x;
bool needsrelocate = FALSE;
- uint16_t mtdblock;
+ uint32_t mtdblock;
uint16_t physsector;
struct smart_read_write_s *req;
struct smart_sect_header_s *header;