1 --- a/drivers/mtd/mtdpart.c
2 +++ b/drivers/mtd/mtdpart.c
3 @@ -515,21 +515,21 @@ static int split_squashfs(struct mtd_inf
7 - if (*((u32 *) buf) != SQUASHFS_MAGIC) {
8 + if (SQUASHFS_MAGIC != le32_to_cpu(sb->s_magic) ) {
9 printk(KERN_ALERT "split_squashfs: no squashfs found in \"%s\"\n",
15 - if (sb->bytes_used <= 0) {
16 + if (le64_to_cpu((sb->bytes_used)) <= 0) {
17 printk(KERN_ALERT "split_squashfs: squashfs is empty in \"%s\"\n",
23 - len = (u32) sb->bytes_used;
24 + len = (u32) le64_to_cpu(sb->bytes_used);
25 len += (offset & 0x000fffff);
26 len += (master->erasesize - 1);
27 len &= ~(master->erasesize - 1);