aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMika Korhonen <mika.j.korhonen@gmail.com>2009-06-11 07:05:07 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-08-03 09:21:58 -0400
commit00acf4a80779611a7ea77ff5b5ffab886ed5cc42 (patch)
tree7099de136d416782100168d2fd439f5a517f00aa /drivers/mtd
parent8022c13c27b822cf22f13df10b42aae89cd56bf0 (diff)
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@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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/onenand/omap2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 38d656b9b2ee..6fac1f496d4a 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)
266 266
267 if (ONENAND_CURRENT_BUFFERRAM(this)) { 267 if (ONENAND_CURRENT_BUFFERRAM(this)) {
268 if (area == ONENAND_DATARAM) 268 if (area == ONENAND_DATARAM)
269 return mtd->writesize; 269 return this->writesize;
270 if (area == ONENAND_SPARERAM) 270 if (area == ONENAND_SPARERAM)
271 return mtd->oobsize; 271 return mtd->oobsize;
272 } 272 }