summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/drivers/mtd
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-03-27 17:38:36 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-03-27 17:38:36 +0000
commit905f2d62f9deeade28e33979a691e45930bc3628 (patch)
treeeeb9390b107101879b6ac362a0f0eca02b401154 /target/linux/ar71xx/files/drivers/mtd
parent37712c70c5e70bffdcf0afd364ed3340f4a7e8fe (diff)
downloadmtk-20170518-905f2d62f9deeade28e33979a691e45930bc3628.zip
mtk-20170518-905f2d62f9deeade28e33979a691e45930bc3628.tar.gz
mtk-20170518-905f2d62f9deeade28e33979a691e45930bc3628.tar.bz2
ar71xx: update image generation and trx header parsing for the WRT160NL
* patch by Bernhard Loos * note: trailing whitespaces has been removed SVN-Revision: 20525
Diffstat (limited to 'target/linux/ar71xx/files/drivers/mtd')
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c b/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c
index da54e0f..e42b3d4 100644
--- a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c
+++ b/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c
@@ -123,12 +123,7 @@ static int wrt160nl_parse_partitions(struct mtd_info *master,
goto free_hdr;
}
- kernel_len = uheader->ih_size / master->erasesize;
- if (uheader->ih_size % master->erasesize)
- kernel_len++;
-
- kernel_len++;
- kernel_len *= master->erasesize;
+ kernel_len = le32_to_cpu(theader->offsets[1]) + sizeof(struct cybertan_header);
trx_parts[0].name = "u-boot";
trx_parts[0].offset = 0;