mtd: OneNAND: fix incorrect bufferram offset
authorMika Korhonen <mika.j.korhonen@gmail.com>
Thu, 11 Jun 2009 11:05:07 +0000 (14:05 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 3 Aug 2009 13:21:58 +0000 (14:21 +0100)
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@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/onenand/omap2.c

index 38d656b9b2eecc8f5029bb0b7a6e89f921ff5a2d..6fac1f496d4ac74c76978527d64a783bed250abf 100644 (file)
@@ -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;
        }