diff options
author | Matteo Croce <matteo@openwrt.org> | 2007-09-11 21:19:57 +0000 |
---|---|---|
committer | Matteo Croce <matteo@openwrt.org> | 2007-09-11 21:19:57 +0000 |
commit | 676cd0d3fcceccb3dc9838a5c1674a9b0782ab0a (patch) | |
tree | b97ce2d7c30acc1ff98fc64889cd3c40ea97218d /target/linux/ar7/files/drivers/mtd | |
parent | c5183457fd8d8249586040bccd1b6d3056b8c641 (diff) | |
download | upstream-676cd0d3fcceccb3dc9838a5c1674a9b0782ab0a.tar.gz upstream-676cd0d3fcceccb3dc9838a5c1674a9b0782ab0a.tar.bz2 upstream-676cd0d3fcceccb3dc9838a5c1674a9b0782ab0a.zip |
AR7: Cleanups (closes: #2323)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8756 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7/files/drivers/mtd')
-rw-r--r-- | target/linux/ar7/files/drivers/mtd/ar7part.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/target/linux/ar7/files/drivers/mtd/ar7part.c b/target/linux/ar7/files/drivers/mtd/ar7part.c index 1111575239..b8c0ed0b2e 100644 --- a/target/linux/ar7/files/drivers/mtd/ar7part.c +++ b/target/linux/ar7/files/drivers/mtd/ar7part.c @@ -36,8 +36,8 @@ struct ar7_bin_rec { static struct mtd_partition ar7_parts[5]; -static int create_mtd_partitions(struct mtd_info *master, - struct mtd_partition **pparts, +static int create_mtd_partitions(struct mtd_info *master, + struct mtd_partition **pparts, unsigned long origin) { struct ar7_bin_rec header; @@ -61,7 +61,8 @@ static int create_mtd_partitions(struct mtd_info *master, do { offset = pre_size; - master->read(master, offset, sizeof(header), &len, (u_char *)&header); + master->read(master, offset, + sizeof(header), &len, (u_char *)&header); if (!strncmp((char *)&header, "TIENV0.8", 8)) ar7_parts[1].offset = pre_size; if (header.checksum == 0xfeedfa42) @@ -83,7 +84,7 @@ static int create_mtd_partitions(struct mtd_info *master, while (header.length) { offset += sizeof(header) + header.length; master->read(master, offset, sizeof(header), - &len, (u_char *)&header); + &len, (u_char *)&header); } root_offset = offset + sizeof(header) + 4; break; @@ -91,7 +92,7 @@ static int create_mtd_partitions(struct mtd_info *master, while (header.length) { offset += sizeof(header) + header.length; master->read(master, offset, sizeof(header), - &len, (u_char *)&header); + &len, (u_char *)&header); } root_offset = offset + sizeof(header) + 4 + 0xff; root_offset &= ~(u32)0xff; @@ -101,7 +102,8 @@ static int create_mtd_partitions(struct mtd_info *master, break; } - master->read(master, root_offset, sizeof(header), &len, (u_char *)&header); + master->read(master, root_offset, + sizeof(header), &len, (u_char *)&header); if (header.checksum != SQUASHFS_MAGIC) { root_offset += master->erasesize - 1; root_offset &= ~(master->erasesize - 1); |