diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2016-03-07 10:46:51 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-03-07 16:23:09 -0800 |
commit | f5b8aa78ef086248145363bf1ffe5ca4348b6a98 (patch) | |
tree | e1cbe852ebab047c0acf6af3c7498b11d37d2786 /fs | |
parent | 9ebfdf5b18493f338237ef9861a555c2f79b0c17 (diff) | |
download | op-kernel-dev-f5b8aa78ef086248145363bf1ffe5ca4348b6a98.zip op-kernel-dev-f5b8aa78ef086248145363bf1ffe5ca4348b6a98.tar.gz |
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 <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/wbuf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 5a3da3f..b25d28a 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -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); |