Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f4fad27aceb87621d40f3068b94b5b11fc0127b
Commit:     4f4fad27aceb87621d40f3068b94b5b11fc0127b
Parent:     a5e7c7b447270d42c3eb4d2259f74019aca9d007
Author:     Kyungmin Park <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 2 09:22:21 2007 +0900
Committer:  Kyungmin Park <[EMAIL PROTECTED]>
CommitDate: Fri Feb 2 09:22:21 2007 +0900

    [MTD] OneNAND: Remove line of code that was meant to be deleted in OOB_AUTO
    
    - Iterations of the patch to add oob auto-placement support to OneNAND left 
a line of code that was meant to have been deleted.
    - read mtd->oobsize in onenand_transfer_auto_oob to optimized memcpy
    
    Signed-off-by: Adrian Hunter <[EMAIL PROTECTED]>
    Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
---
 drivers/mtd/onenand/onenand_base.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index 67efbc7..eb94d94 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -810,8 +810,7 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, 
uint8_t *buf, int col
                        readend += free->offset - lastgap;
                lastgap = free->offset + free->length;
        }
-       this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf + readcol,
-                            readcol, readend - readcol);
+       this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf, 0, mtd->oobsize);
        for (free = this->ecclayout->oobfree; free->length; ++free) {
                int free_end = free->offset + free->length;
                if (free->offset < readend && free_end > readcol) {
@@ -926,13 +925,12 @@ out:
 static int onenand_read_oob(struct mtd_info *mtd, loff_t from,
                            struct mtd_oob_ops *ops)
 {
-       switch (ops->mode)
-       {
+       switch (ops->mode) {
        case MTD_OOB_PLACE:
        case MTD_OOB_AUTO:
                break;
        case MTD_OOB_RAW:
-               return -EINVAL; /* Not implemented yet */
+               /* Not implemented yet */
        default:
                return -EINVAL;
        }
@@ -1143,7 +1141,6 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, 
u_char *oob_buf,
                        writeend += free->offset - lastgap;
                lastgap = free->offset + free->length;
        }
-       writeend = mtd->oobsize;
        for (free = this->ecclayout->oobfree; free->length; ++free) {
                int free_end = free->offset + free->length;
                if (free->offset < writeend && free_end > writecol) {
@@ -1264,13 +1261,12 @@ out:
 static int onenand_write_oob(struct mtd_info *mtd, loff_t to,
                             struct mtd_oob_ops *ops)
 {
-       switch (ops->mode)
-       {
+       switch (ops->mode) {
        case MTD_OOB_PLACE:
        case MTD_OOB_AUTO:
                break;
        case MTD_OOB_RAW:
-               return -EINVAL; /* Not implemented yet */
+               /* Not implemented yet */
        default:
                return -EINVAL;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to