mtd: OneNAND: fix incorrect bufferram offset

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Aug 3 09:59:01 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=00acf4a80779611a7ea77ff5b5ffab886ed5cc42
Commit:     00acf4a80779611a7ea77ff5b5ffab886ed5cc42
Parent:     8022c13c27b822cf22f13df10b42aae89cd56bf0
Author:     Mika Korhonen <mika.j.korhonen at gmail.com>
AuthorDate: Thu Jun 11 14:05:07 2009 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Aug 3 14:21:58 2009 +0100

    mtd: OneNAND: fix incorrect bufferram offset
    
    Fixes the case where CONFIG_MTD_ONENAND_2X_PROGRAM is set and
    the real page size differs from mtd_info.writesize.
    
    Signed-off-by: Mika Korhonen <mika.j.korhonen at gmail.com>
    Acked-by: Kyungmin Park <kyungmin.park at samsung.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/onenand/omap2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 38d656b..6fac1f4 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -266,7 +266,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area)
 
 	if (ONENAND_CURRENT_BUFFERRAM(this)) {
 		if (area == ONENAND_DATARAM)
-			return mtd->writesize;
+			return this->writesize;
 		if (area == ONENAND_SPARERAM)
 			return mtd->oobsize;
 	}



More information about the linux-mtd-cvs mailing list