122-mtd-bcm63xxpart-add-of_match_table.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 89cd5efa4a0d342b860a726bb1d382e4db4b96a4 Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <[email protected]>
  3. Date: Wed, 28 Jun 2017 18:34:42 +0200
  4. Subject: [PATCH 1/2] mtd: bcm63xxpart: add of_match_table
  5. Signed-off-by: Jonas Gorski <[email protected]>
  6. ---
  7. drivers/mtd/bcm63xxpart.c | 8 ++++++++
  8. 1 file changed, 8 insertions(+)
  9. --- a/drivers/mtd/bcm63xxpart.c
  10. +++ b/drivers/mtd/bcm63xxpart.c
  11. @@ -34,6 +34,7 @@
  12. #include <linux/vmalloc.h>
  13. #include <linux/mtd/mtd.h>
  14. #include <linux/mtd/partitions.h>
  15. +#include <linux/of.h>
  16. #define BCM963XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */
  17. @@ -172,9 +173,16 @@ out:
  18. return ret;
  19. };
  20. +static const struct of_device_id parse_bcm63xx_cfe_match_table[] = {
  21. + { .compatible = "brcm,bcm963xx-cfe-nor-partitions" },
  22. + {},
  23. +};
  24. +MODULE_DEVICE_TABLE(of, parse_bcm63xx_cfe_match_table);
  25. +
  26. static struct mtd_part_parser bcm63xx_cfe_parser = {
  27. .parse_fn = bcm63xx_parse_cfe_partitions,
  28. .name = "bcm63xxpart",
  29. + .of_match_table = parse_bcm63xx_cfe_match_table,
  30. };
  31. module_mtd_part_parser(bcm63xx_cfe_parser);