kernel: don't auto-split "firmware" if it has "compatible" DT property
[openwrt/staging/dedeckeh.git] / target / linux / generic / pending-4.14 / 402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
index 3c105b2a47fc6d6509e9e86a3bf4ea1a7461452b..240d0b2a25388334f0bdea912f6ddd241e48cd97 100644 (file)
@@ -28,9 +28,9 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +              rootfs_found = 1;
 +      }
 +
-       if (!strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) &&
-           IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE))
-               split_firmware(master, part);
+       if (IS_ENABLED(CONFIG_MTD_SPLIT_FIRMWARE) &&
+           !strcmp(part->mtd.name, SPLIT_FIRMWARE_NAME) &&
+           !of_find_property(mtd_get_of_node(&part->mtd), "compatible", NULL))
 --- a/include/linux/mtd/partitions.h
 +++ b/include/linux/mtd/partitions.h
 @@ -75,6 +75,8 @@ struct mtd_part_parser_data {