412-MTD-physmap-allow-passing-pp_data.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 266c506f4b262bd6aba0776a03d82c98e65d9906 Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jonas.gorski@gmail.com>
  3. Date: Tue, 1 May 2012 17:32:36 +0200
  4. Subject: [PATCH 63/79] MTD: physmap: allow passing pp_data
  5. ---
  6. drivers/mtd/maps/physmap.c | 4 +++-
  7. include/linux/mtd/physmap.h | 1 +
  8. 2 files changed, 4 insertions(+), 1 deletion(-)
  9. --- a/drivers/mtd/maps/physmap.c
  10. +++ b/drivers/mtd/maps/physmap.c
  11. @@ -96,6 +96,7 @@ static int physmap_flash_probe(struct pl
  12. {
  13. struct physmap_flash_data *physmap_data;
  14. struct physmap_flash_info *info;
  15. + struct mtd_part_parser_data *pp_data;
  16. const char * const *probe_type;
  17. const char * const *part_types;
  18. int err = 0;
  19. @@ -186,8 +187,9 @@ static int physmap_flash_probe(struct pl
  20. spin_lock_init(&info->vpp_lock);
  21. part_types = physmap_data->part_probe_types ? : part_probe_types;
  22. + pp_data = physmap_data->pp_data ? physmap_data->pp_data : NULL;
  23. - mtd_device_parse_register(info->cmtd, part_types, NULL,
  24. + mtd_device_parse_register(info->cmtd, part_types, pp_data,
  25. physmap_data->parts, physmap_data->nr_parts);
  26. return 0;
  27. --- a/include/linux/mtd/physmap.h
  28. +++ b/include/linux/mtd/physmap.h
  29. @@ -31,6 +31,7 @@ struct physmap_flash_data {
  30. char *probe_type;
  31. struct mtd_partition *parts;
  32. const char * const *part_probe_types;
  33. + struct mtd_part_parser_data *pp_data;
  34. };
  35. #endif /* __LINUX_MTD_PHYSMAP__ */