summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Korhonen <mika.j.korhonen@gmail.com>2009-06-11 13:05:07 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-08-03 15:21:58 +0200
commit00acf4a80779611a7ea77ff5b5ffab886ed5cc42 (patch)
tree7099de136d416782100168d2fd439f5a517f00aa
parentmtd: blkdevs: do not forget to get MTD devices (diff)
downloadlinux-00acf4a80779611a7ea77ff5b5ffab886ed5cc42.tar.xz
linux-00acf4a80779611a7ea77ff5b5ffab886ed5cc42.zip
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>
-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)
if (ONENAND_CURRENT_BUFFERRAM(this)) {
if (area == ONENAND_DATARAM)
- return mtd->writesize;
+ return this->writesize;
if (area == ONENAND_SPARERAM)
return mtd->oobsize;
}