[MTD] [NAND] make oobavail public
During the MTD rework the oobavail parameter of mtd_info structure has become private. This is not quite correct in terms of integrity and logic. If we have means to write to OOB area, then we'd like to know upfront how many bytes out of OOB are spare per page to be able to adapt to specific cases. The patch inlined adds the public oobavail parameter. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
eee8abe5de
commit
1f92267c51
@@ -2524,6 +2524,7 @@ int nand_scan_tail(struct mtd_info *mtd)
|
||||
for (i = 0; chip->ecc.layout->oobfree[i].length; i++)
|
||||
chip->ecc.layout->oobavail +=
|
||||
chip->ecc.layout->oobfree[i].length;
|
||||
mtd->oobavail = chip->ecc.layout->oobavail;
|
||||
|
||||
/*
|
||||
* Set the number of read / write steps for one page depending on ECC
|
||||
|
Reference in New Issue
Block a user