]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/ubi/wl.c
UBI: kill homegrown endian macros
[linux-2.6-omap-h63xx.git] / drivers / mtd / ubi / wl.c
index 9ecaf77eca9ebd16cb1a761bab0aa2f9d63a5fbd..d512cf16350dd06180a309861cab09a0b9a2991f 100644 (file)
@@ -667,7 +667,7 @@ static int sync_erase(struct ubi_device *ubi, struct ubi_wl_entry *e, int tortur
 
        dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec);
 
-       ec_hdr->ec = cpu_to_ubi64(ec);
+       ec_hdr->ec = cpu_to_be64(ec);
 
        err = ubi_io_write_ec_hdr(ubi, e->pnum, ec_hdr);
        if (err)
@@ -1346,6 +1346,7 @@ static int ubi_thread(void *u)
        ubi_msg("background thread \"%s\" started, PID %d",
                ubi->bgt_name, current->pid);
 
+       set_freezable();
        for (;;) {
                int err;
 
@@ -1633,7 +1634,7 @@ static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec)
                goto out_free;
        }
 
-       read_ec = ubi64_to_cpu(ec_hdr->ec);
+       read_ec = be64_to_cpu(ec_hdr->ec);
        if (ec != read_ec) {
                ubi_err("paranoid check failed for PEB %d", pnum);
                ubi_err("read EC is %lld, should be %d", read_ec, ec);