bcm63xx: Simplify CFE detection.
[openwrt.git] / target / linux / brcm63xx / patches-3.8 / 417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch
index d33f899..5ce8223 100644 (file)
@@ -7,7 +7,7 @@ contained in flash.
 
 --- a/drivers/mtd/bcm63xxpart.c
 +++ b/drivers/mtd/bcm63xxpart.c
-@@ -77,10 +77,12 @@ static int bcm63xx_parse_cfe_partitions(
+@@ -53,10 +53,12 @@ static int bcm63xx_parse_cfe_partitions(
        struct mtd_partition *parts;
        int ret;
        size_t retlen;
@@ -21,7 +21,7 @@ contained in flash.
        int i;
        u32 computed_crc;
        bool rootfs_first = false;
-@@ -94,6 +96,24 @@ static int bcm63xx_parse_cfe_partitions(
+@@ -70,6 +72,24 @@ static int bcm63xx_parse_cfe_partitions(
        cfelen = cfe_erasesize;
        nvramlen = bcm63xx_nvram_get_psi_size();
        nvramlen = roundup(nvramlen, cfe_erasesize);
@@ -46,7 +46,7 @@ contained in flash.
  
        /* Allocate memory for buffer */
        buf = vmalloc(sizeof(struct bcm_tag));
-@@ -145,7 +165,7 @@ static int bcm63xx_parse_cfe_partitions(
+@@ -121,7 +141,7 @@ static int bcm63xx_parse_cfe_partitions(
                rootfsaddr = 0;
                spareaddr = cfelen;
        }
@@ -55,7 +55,7 @@ contained in flash.
  
        /* Determine number of partitions */
        if (rootfslen > 0)
-@@ -154,6 +174,12 @@ static int bcm63xx_parse_cfe_partitions(
+@@ -130,6 +150,12 @@ static int bcm63xx_parse_cfe_partitions(
        if (kernellen > 0)
                nrparts++;
  
@@ -68,7 +68,7 @@ contained in flash.
        /* Ask kernel for more memory */
        parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL);
        if (!parts) {
-@@ -191,15 +217,32 @@ static int bcm63xx_parse_cfe_partitions(
+@@ -167,15 +193,32 @@ static int bcm63xx_parse_cfe_partitions(
                curpart++;
        }