mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mtd: kill the ecclayout->oobavail field
ecclayout->oobavail is just redundant with the mtd->oobavail field. Moreover, it prevents static const definition of ecc layouts since the NAND framework is calculating this value based on the ecclayout->oobfree field. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
This commit is contained in:
parent
9ebfdf5b18
commit
f5b8aa78ef
11 changed files with 53 additions and 65 deletions
|
|
@ -1183,22 +1183,20 @@ void jffs2_dirty_trigger(struct jffs2_sb_info *c)
|
|||
|
||||
int jffs2_nand_flash_setup(struct jffs2_sb_info *c)
|
||||
{
|
||||
struct nand_ecclayout *oinfo = c->mtd->ecclayout;
|
||||
|
||||
if (!c->mtd->oobsize)
|
||||
return 0;
|
||||
|
||||
/* Cleanmarker is out-of-band, so inline size zero */
|
||||
c->cleanmarker_size = 0;
|
||||
|
||||
if (!oinfo || oinfo->oobavail == 0) {
|
||||
if (c->mtd->oobavail == 0) {
|
||||
pr_err("inconsistent device description\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
jffs2_dbg(1, "using OOB on NAND\n");
|
||||
|
||||
c->oobavail = oinfo->oobavail;
|
||||
c->oobavail = c->mtd->oobavail;
|
||||
|
||||
/* Initialise write buffer */
|
||||
init_rwsem(&c->wbuf_sem);
|
||||
|
|
|
|||
Loading…
Reference in a new issue