diff options
| author | htbegin <hotforest@gmail.com> | 2013-03-01 22:59:27 +0000 | 
|---|---|---|
| committer | Scott Wood <scottwood@freescale.com> | 2013-05-22 16:43:47 -0500 | 
| commit | 070fd8e5295185546801a0f11ea5edd22833a02b (patch) | |
| tree | c06d960881630165002c6895da92d8e3ac5df11f | |
| parent | e834402fa09de8537ab850b971f6e468e3430593 (diff) | |
| download | olio-uboot-2014.01-070fd8e5295185546801a0f11ea5edd22833a02b.tar.xz olio-uboot-2014.01-070fd8e5295185546801a0f11ea5edd22833a02b.zip | |
mtd: nand: fix the partial page write condition
When writelen is mtd->writesize - 1, it is still a partial page write
Signed-off-by: Tao Hou <hotforest@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index a2d06be99..3d846592c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -1973,7 +1973,7 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,  		uint8_t *wbuf = buf;  		/* Partial page write ? */ -		if (unlikely(column || writelen < (mtd->writesize - 1))) { +		if (unlikely(column || writelen < mtd->writesize)) {  			cached = 0;  			bytes = min_t(int, bytes - column, (int) writelen);  			chip->pagebuf = -1; |