diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-09-02 19:11:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-19 10:19:56 -0400 |
commit | 74d82d2660058e32644f0c673656b2a1d01d3688 (patch) | |
tree | 8b90af4d6014ea50d74c504dc832cf3a9c3fff10 /drivers/mtd/ubi/wl.c | |
parent | 756e1df1d2b8b572a92dd1b82d2a432d5b280b1c (diff) |
UBI: remove duplicate IO error codes
The 'UBI_IO_PEB_EMPTY' and 'UBI_IO_PEB_FREE' are essentially the same
and mean that there are only 0xFF bytes instead of headers. Simplify
UBI a little by turning them into a single 'UBI_IO_FF' error code.
Also, stop maintaining commentaries in 'ubi_io_read_vid_hdr()' which are
almost identical to commentaries in 'ubi_io_read_ec_hdr()'.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r-- | drivers/mtd/ubi/wl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 97a435672eaf..a9e7c9eed703 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -745,7 +745,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, | |||
745 | 745 | ||
746 | err = ubi_io_read_vid_hdr(ubi, e1->pnum, vid_hdr, 0); | 746 | err = ubi_io_read_vid_hdr(ubi, e1->pnum, vid_hdr, 0); |
747 | if (err && err != UBI_IO_BITFLIPS) { | 747 | if (err && err != UBI_IO_BITFLIPS) { |
748 | if (err == UBI_IO_PEB_FREE) { | 748 | if (err == UBI_IO_FF) { |
749 | /* | 749 | /* |
750 | * We are trying to move PEB without a VID header. UBI | 750 | * We are trying to move PEB without a VID header. UBI |
751 | * always write VID headers shortly after the PEB was | 751 | * always write VID headers shortly after the PEB was |