[MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Mar 9 03:59:02 EST 2007


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=5bc399e9ef430efd5725b66aa2ad7ad2d81e372b
Commit:     5bc399e9ef430efd5725b66aa2ad7ad2d81e372b
Parent:     81280d5879761f90b3a341d52371d03998730d8e
Author:     Kyungmin Park <kyungmin.park at samsung.com>
AuthorDate: Fri Mar 9 09:41:07 2007 +0900
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Fri Mar 9 08:06:39 2007 +0000

    [MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished
    
    When transferring/filling of the oob is finished in OOB_AUTO, we exit the loop
    
    Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/onenand/onenand_base.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index eac9b28..6d4e67f 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -854,7 +854,8 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col
 			int n = ed - st;
 			memcpy(buf, oob_buf + st, n);
 			buf += n;
-		}
+		} else
+			break;
 	}
 	return 0;
 }
@@ -1295,7 +1296,8 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf,
 			int n = ed - st;
 			memcpy(oob_buf + st, buf, n);
 			buf += n;
-		}
+		} else
+			break;
 	}
 	return 0;
 }



More information about the linux-mtd-cvs mailing list