1 --- a/drivers/mtd/ar7part.c
2 +++ b/drivers/mtd/ar7part.c
4 #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
5 #define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
7 +#ifndef SQUASHFS_MAGIC
8 +#define SQUASHFS_MAGIC 0x73717368
12 unsigned int checksum;
14 @@ -47,7 +51,8 @@ static int create_mtd_partitions(struct
17 struct ar7_bin_rec header;
18 - unsigned int offset, len;
19 + unsigned int offset;
21 unsigned int pre_size = master->erasesize, post_size = 0;
22 unsigned int root_offset = ROOT_OFFSET;
24 @@ -66,7 +71,7 @@ static int create_mtd_partitions(struct
25 do { /* Try 10 blocks starting from master->erasesize */
27 master->read(master, offset,
28 - sizeof(header), &len, (u8 *)&header);
29 + sizeof(header), &len, (uint8_t *)&header);
30 if (!strncmp((char *)&header, "TIENV0.8", 8))
31 ar7_parts[1].offset = pre_size;
32 if (header.checksum == LOADER_MAGIC1)
33 @@ -88,7 +93,7 @@ static int create_mtd_partitions(struct
34 while (header.length) {
35 offset += sizeof(header) + header.length;
36 master->read(master, offset, sizeof(header),
37 - &len, (u8 *)&header);
38 + &len, (uint8_t *)&header);
40 root_offset = offset + sizeof(header) + 4;
42 @@ -96,10 +101,10 @@ static int create_mtd_partitions(struct
43 while (header.length) {
44 offset += sizeof(header) + header.length;
45 master->read(master, offset, sizeof(header),
46 - &len, (u8 *)&header);
47 + &len, (uint8_t *)&header);
49 root_offset = offset + sizeof(header) + 4 + 0xff;
50 - root_offset &= ~(u32)0xff;
51 + root_offset &= ~(uint32_t)0xff;
54 printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum);