diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2007-10-26 07:51:49 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2007-10-26 07:51:49 +0000 |
commit | d29af25874381a4f325cf459a81357738f83e427 (patch) | |
tree | 2c22aab1a7a5e2861fcfc417b00921373ae14756 /target/linux/adm5120/files/drivers/mtd | |
parent | 41815ee5c8e09f3d3fca0e38045d99f9f4da5e12 (diff) | |
download | upstream-d29af25874381a4f325cf459a81357738f83e427.tar.gz upstream-d29af25874381a4f325cf459a81357738f83e427.tar.bz2 upstream-d29af25874381a4f325cf459a81357738f83e427.zip |
reduce wasted flash space by ~56K on Edimax devices, thanks to Bernhard Held (closes: #2549)
SVN-Revision: 9450
Diffstat (limited to 'target/linux/adm5120/files/drivers/mtd')
-rw-r--r-- | target/linux/adm5120/files/drivers/mtd/trxsplit.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/target/linux/adm5120/files/drivers/mtd/trxsplit.c b/target/linux/adm5120/files/drivers/mtd/trxsplit.c index 19d1e9da97..748ad86d2d 100644 --- a/target/linux/adm5120/files/drivers/mtd/trxsplit.c +++ b/target/linux/adm5120/files/drivers/mtd/trxsplit.c @@ -51,7 +51,7 @@ struct trx_header { u32 offsets[TRX_MAX_OFFSET]; /* Offsets of partitions */ }; -#define BLOCK_LEN_MIN 0x10000 +#define TRX_ALIGN 0x1000 static int trx_nr_parts; static unsigned long trx_offset; @@ -104,17 +104,12 @@ err_out: static void trxsplit_findtrx(struct mtd_info *mtd) { unsigned long offset; - unsigned long blocklen; int err; - blocklen = mtd->erasesize; - if (blocklen < BLOCK_LEN_MIN) - blocklen = BLOCK_LEN_MIN; - printk(KERN_INFO PFX "searching TRX header in '%s'\n", mtd->name); err = 0; - for (offset = 0; offset < mtd->size; offset += blocklen) { + for (offset = 0; offset < mtd->size; offset += TRX_ALIGN) { err = trxsplit_checktrx(mtd, offset); if (err == 0) break; |