brcm47xx: bgmac: update to version form netdev git repository
[openwrt.git] / target / linux / brcm47xx / patches-3.8 / 022-mtd-bcm47xxpart-add-support-for-other-erase-sizes.patch
1 --- a/drivers/mtd/bcm47xxpart.c
2 +++ b/drivers/mtd/bcm47xxpart.c
3 @@ -59,11 +59,14 @@ static int bcm47xxpart_parse(struct mtd_
4         uint32_t *buf;
5         size_t bytes_read;
6         uint32_t offset;
7 -       uint32_t blocksize = 0x10000;
8 +       uint32_t blocksize = master->erasesize;
9         struct trx_header *trx;
10         int trx_part = -1;
11         int last_trx_part = -1;
12  
13 +       if (blocksize <= 0x10000)
14 +               blocksize = 0x10000;
15 +
16         /* Alloc */
17         parts = kzalloc(sizeof(struct mtd_partition) * BCM47XXPART_MAX_PARTS,
18                         GFP_KERNEL);