419-mtd-redboot-add-of_match_table-with-DT-binding.patch 912 B

12345678910111213141516171819202122232425262728293031
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
  2. Subject: [PATCH] mtd: redboot: add of_match_table with DT binding
  3. MIME-Version: 1.0
  4. Content-Type: text/plain; charset=UTF-8
  5. Content-Transfer-Encoding: 8bit
  6. This allows parsing RedBoot compatible partitions for properly described
  7. flash device in DT.
  8. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  9. ---
  10. --- a/drivers/mtd/redboot.c
  11. +++ b/drivers/mtd/redboot.c
  12. @@ -289,9 +289,16 @@ static int parse_redboot_partitions(stru
  13. return ret;
  14. }
  15. +static const struct of_device_id redboot_parser_of_match_table[] = {
  16. + { .compatible = "ecoscentric,redboot-fis-partitions" },
  17. + {},
  18. +};
  19. +MODULE_DEVICE_TABLE(of, redboot_parser_of_match_table);
  20. +
  21. static struct mtd_part_parser redboot_parser = {
  22. .parse_fn = parse_redboot_partitions,
  23. .name = "RedBoot",
  24. + .of_match_table = redboot_parser_of_match_table,
  25. };
  26. module_mtd_part_parser(redboot_parser);