diff options
Diffstat (limited to 'fs/jffs2/wbuf.c')
-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 5a3da3f52908..b25d28a21212 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -1183,22 +1183,20 @@ void jffs2_dirty_trigger(struct jffs2_sb_info *c) | |||
1183 | 1183 | ||
1184 | int jffs2_nand_flash_setup(struct jffs2_sb_info *c) | 1184 | int jffs2_nand_flash_setup(struct jffs2_sb_info *c) |
1185 | { | 1185 | { |
1186 | struct nand_ecclayout *oinfo = c->mtd->ecclayout; | ||
1187 | |||
1188 | if (!c->mtd->oobsize) | 1186 | if (!c->mtd->oobsize) |
1189 | return 0; | 1187 | return 0; |
1190 | 1188 | ||
1191 | /* Cleanmarker is out-of-band, so inline size zero */ | 1189 | /* Cleanmarker is out-of-band, so inline size zero */ |
1192 | c->cleanmarker_size = 0; | 1190 | c->cleanmarker_size = 0; |
1193 | 1191 | ||
1194 | if (!oinfo || oinfo->oobavail == 0) { | 1192 | if (c->mtd->oobavail == 0) { |
1195 | pr_err("inconsistent device description\n"); | 1193 | pr_err("inconsistent device description\n"); |
1196 | return -EINVAL; | 1194 | return -EINVAL; |
1197 | } | 1195 | } |
1198 | 1196 | ||
1199 | jffs2_dbg(1, "using OOB on NAND\n"); | 1197 | jffs2_dbg(1, "using OOB on NAND\n"); |
1200 | 1198 | ||
1201 | c->oobavail = oinfo->oobavail; | 1199 | c->oobavail = c->mtd->oobavail; |
1202 | 1200 | ||
1203 | /* Initialise write buffer */ | 1201 | /* Initialise write buffer */ |
1204 | init_rwsem(&c->wbuf_sem); | 1202 | init_rwsem(&c->wbuf_sem); |