000-4.5-06-mtd-ofpart-drop-of_node-partition-parser-data.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From e270bca531b40cd0a143176eb093d173b9c6f418 Mon Sep 17 00:00:00 2001
  2. From: Brian Norris <computersforpeace@gmail.com>
  3. Date: Fri, 30 Oct 2015 20:33:29 -0700
  4. Subject: [PATCH] mtd: ofpart: drop 'of_node' partition parser data
  5. This field is no longer used anywhere, as it is superseded by
  6. mtd->dev.of_node.
  7. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  8. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
  9. ---
  10. drivers/mtd/ofpart.c | 14 ++++----------
  11. include/linux/mtd/partitions.h | 4 ----
  12. 2 files changed, 4 insertions(+), 14 deletions(-)
  13. --- a/drivers/mtd/ofpart.c
  14. +++ b/drivers/mtd/ofpart.c
  15. @@ -37,11 +37,8 @@ static int parse_ofpart_partitions(struc
  16. bool dedicated = true;
  17. - /*
  18. - * of_node can be provided through auxiliary parser data or (preferred)
  19. - * by assigning the master device node
  20. - */
  21. - mtd_node = data && data->of_node ? data->of_node : mtd_get_of_node(master);
  22. + /* Pull of_node from the master device node */
  23. + mtd_node = mtd_get_of_node(master);
  24. if (!mtd_node)
  25. return 0;
  26. @@ -158,11 +155,8 @@ static int parse_ofoldpart_partitions(st
  27. } *part;
  28. const char *names;
  29. - /*
  30. - * of_node can be provided through auxiliary parser data or (preferred)
  31. - * by assigning the master device node
  32. - */
  33. - dp = data && data->of_node ? data->of_node : mtd_get_of_node(master);
  34. + /* Pull of_node from the master device node */
  35. + dp = mtd_get_of_node(master);
  36. if (!dp)
  37. return 0;
  38. --- a/include/linux/mtd/partitions.h
  39. +++ b/include/linux/mtd/partitions.h
  40. @@ -56,13 +56,9 @@ struct device_node;
  41. /**
  42. * struct mtd_part_parser_data - used to pass data to MTD partition parsers.
  43. * @origin: for RedBoot, start address of MTD device
  44. - * @of_node: for OF parsers, device node containing partitioning information.
  45. - * This field is deprecated, as the device node should simply be
  46. - * assigned to the master struct device.
  47. */
  48. struct mtd_part_parser_data {
  49. unsigned long origin;
  50. - struct device_node *of_node;
  51. };