brcm63xx: backport mtd of node changes from upstream
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 425-bcm63xxpart_parse_paritions_from_dt.patch
index 53fc4c5d23089fc902c27ba162b56e395c1d2f27..330ec1ecafa32b22debfb53077dc8207ad419e06 100644 (file)
 +                                         struct mtd_partition **pparts,
 +                                         struct mtd_part_parser_data *data)
 +{
-+      struct device_node *dp = data->of_node;
++      struct device_node *dp = mtd_get_of_node(master);
 +      struct device_node *pp;
 +      int i, nr_parts = 0;
 +      const char *partname;
 +                                  struct mtd_partition **pparts,
 +                                  struct mtd_part_parser_data *data)
 +{
-+      if (data && data->of_node)
++      if (mtd_get_of_node(master))
 +              return bcm63xx_parse_cfe_partitions_of(master, pparts, data);
 +      else
 +              return bcm63xx_parse_cfe_partitions(master, pparts, data);