100-mtd-physmap-try-static-partitions-first.patch 826 B

123456789101112131415161718192021222324252627282930
  1. --- a/drivers/mtd/maps/physmap.c
  2. +++ b/drivers/mtd/maps/physmap.c
  3. @@ -173,6 +173,13 @@ static int physmap_flash_probe(struct pl
  4. goto err_out;
  5. #ifdef CONFIG_MTD_PARTITIONS
  6. + if (physmap_data->nr_parts) {
  7. + printk(KERN_NOTICE "Using physmap partition information\n");
  8. + add_mtd_partitions(info->cmtd, physmap_data->parts,
  9. + physmap_data->nr_parts);
  10. + return 0;
  11. + }
  12. +
  13. err = parse_mtd_partitions(info->cmtd, part_probe_types,
  14. &info->parts, 0);
  15. if (err > 0) {
  16. @@ -180,13 +187,6 @@ static int physmap_flash_probe(struct pl
  17. info->nr_parts = err;
  18. return 0;
  19. }
  20. -
  21. - if (physmap_data->nr_parts) {
  22. - printk(KERN_NOTICE "Using physmap partition information\n");
  23. - add_mtd_partitions(info->cmtd, physmap_data->parts,
  24. - physmap_data->nr_parts);
  25. - return 0;
  26. - }
  27. #endif
  28. add_mtd_device(info->cmtd);