Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274949
b: refs/heads/master
c: c5e8ef9
h: refs/heads/master
i:
  274947: 738aaa0
v: v3
  • Loading branch information
Brian Norris authored and Artem Bityutskiy committed Sep 11, 2011
1 parent f4dbed4 commit fdca76b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 596d74527a804418d88e1178c9d72aff5649e89c
refs/heads/master: c5e8ef9c21a492f1e0436b350bbc3e916f93e506
24 changes: 5 additions & 19 deletions trunk/drivers/mtd/nand/nand_bbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,30 +898,19 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc
if (td->pages[i] == -1 && md->pages[i] == -1) {
writeops = 0x03;
goto create;
}

if (td->pages[i] == -1) {
} else if (td->pages[i] == -1) {
rd = md;
td->version[i] = md->version[i];
writeops = 0x01;
goto writecheck;
}

if (md->pages[i] == -1) {
} else if (md->pages[i] == -1) {
rd = td;
md->version[i] = td->version[i];
writeops = 0x02;
goto writecheck;
}

if (td->version[i] == md->version[i]) {
} else if (td->version[i] == md->version[i]) {
rd = td;
if (!(td->options & NAND_BBT_VERSION))
rd2 = md;
goto writecheck;
}

if (((int8_t)(td->version[i] - md->version[i])) > 0) {
} else if (((int8_t)(td->version[i] - md->version[i])) > 0) {
rd = td;
md->version[i] = td->version[i];
writeops = 0x02;
Expand All @@ -930,17 +919,14 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc
td->version[i] = md->version[i];
writeops = 0x01;
}

goto writecheck;

} else {
if (td->pages[i] == -1) {
writeops = 0x01;
goto create;
}
rd = td;
goto writecheck;
}
goto writecheck;
create:
/* Create the bad block table by scanning the device? */
if (!(td->options & NAND_BBT_CREATE))
Expand Down

0 comments on commit fdca76b

Please sign in to comment.