diff options
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r-- | drivers/mtd/ubi/wl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index ab2174a56bc2..d512cf16350d 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -667,7 +667,7 @@ static int sync_erase(struct ubi_device *ubi, struct ubi_wl_entry *e, int tortur | |||
667 | 667 | ||
668 | dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec); | 668 | dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec); |
669 | 669 | ||
670 | ec_hdr->ec = cpu_to_ubi64(ec); | 670 | ec_hdr->ec = cpu_to_be64(ec); |
671 | 671 | ||
672 | err = ubi_io_write_ec_hdr(ubi, e->pnum, ec_hdr); | 672 | err = ubi_io_write_ec_hdr(ubi, e->pnum, ec_hdr); |
673 | if (err) | 673 | if (err) |
@@ -1634,7 +1634,7 @@ static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec) | |||
1634 | goto out_free; | 1634 | goto out_free; |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | read_ec = ubi64_to_cpu(ec_hdr->ec); | 1637 | read_ec = be64_to_cpu(ec_hdr->ec); |
1638 | if (ec != read_ec) { | 1638 | if (ec != read_ec) { |
1639 | ubi_err("paranoid check failed for PEB %d", pnum); | 1639 | ubi_err("paranoid check failed for PEB %d", pnum); |
1640 | ubi_err("read EC is %lld, should be %d", read_ec, ec); | 1640 | ubi_err("read EC is %lld, should be %d", read_ec, ec); |