Ignore:
Timestamp:
2007-10-26T09:51:49+02:00 (9 years ago)
Author:
juhosg
Message:

[adm5120] reduce wasted flash space by ~56K on Edimax devices, thanks to Bernhard Held (closes: #2549)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/adm5120/files/drivers/mtd/trxsplit.c

    r9263 r9450  
    5252}; 
    5353 
    54 #define BLOCK_LEN_MIN           0x10000 
     54#define TRX_ALIGN       0x1000 
    5555 
    5656static int trx_nr_parts; 
     
    105105{ 
    106106        unsigned long offset; 
    107         unsigned long blocklen; 
    108107        int err; 
    109108 
    110         blocklen = mtd->erasesize; 
    111         if (blocklen < BLOCK_LEN_MIN) 
    112                 blocklen = BLOCK_LEN_MIN; 
    113  
    114109        printk(KERN_INFO PFX "searching TRX header in '%s'\n", mtd->name); 
    115110 
    116111        err = 0; 
    117         for (offset = 0; offset < mtd->size; offset += blocklen) { 
     112        for (offset = 0; offset < mtd->size; offset += TRX_ALIGN) { 
    118113                err = trxsplit_checktrx(mtd, offset); 
    119114                if (err == 0) 
Note: See TracChangeset for help on using the changeset viewer.