kernel: generic: fix problem with w1-gpio-custom
[openwrt/openwrt.git] / target / linux / generic / pending-4.9 / 431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch
index 9299e886712401ce4418bd3eb97b509cd4c32de9..cbd185e0ae0f362acb2e948e06873f518f2d77ee 100644 (file)
@@ -6,7 +6,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
 
 --- a/drivers/mtd/parsers/parser_trx.c
 +++ b/drivers/mtd/parsers/parser_trx.c
-@@ -29,6 +29,33 @@ struct trx_header {
+@@ -30,6 +30,33 @@ struct trx_header {
        uint32_t offset[3];
  } __packed;
  
@@ -40,7 +40,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  static const char *parser_trx_data_part_name(struct mtd_info *master,
                                             size_t offset)
  {
-@@ -83,21 +110,21 @@ static int parser_trx_parse(struct mtd_i
+@@ -84,21 +111,21 @@ static int parser_trx_parse(struct mtd_i
        if (trx.offset[2]) {
                part = &parts[curr_part++];
                part->name = "loader";
@@ -59,9 +59,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  
        if (trx.offset[i]) {
                part = &parts[curr_part++];
-               part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
+-              part->name = parser_trx_data_part_name(mtd, trx.offset[i]);
 -              part->offset = trx.offset[i];
 +              part->offset = parser_trx_real_offset(mtd, trx.offset[i]);
++              part->name = parser_trx_data_part_name(mtd, part->offset);
                i++;
        }