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>
This commit is contained in:
parent
8022c13c27
commit
00acf4a807
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue