414-MTD-m25p80-allow-passing-pp_data.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 7f17dfe9009beb07a3de0e380932a725293829df Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jonas.gorski@gmail.com>
  3. Date: Tue, 1 May 2012 17:33:03 +0200
  4. Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data
  5. ---
  6. drivers/mtd/devices/m25p80.c | 5 +++--
  7. include/linux/spi/flash.h | 2 ++
  8. 2 files changed, 5 insertions(+)
  9. --- a/drivers/mtd/devices/m25p80.c
  10. +++ b/drivers/mtd/devices/m25p80.c
  11. @@ -276,7 +276,8 @@ static int m25p_probe(struct spi_device
  12. return ret;
  13. return mtd_device_parse_register(&nor->mtd,
  14. - data ? data->part_probe_types : NULL, NULL,
  15. + data ? data->part_probe_types : NULL,
  16. + data ? data->pp_data : NULL,
  17. data ? data->parts : NULL,
  18. data ? data->nr_parts : 0);
  19. }
  20. --- a/include/linux/spi/flash.h
  21. +++ b/include/linux/spi/flash.h
  22. @@ -12,6 +12,7 @@ struct mtd_part_parser_data;
  23. * with chips that can't be queried for JEDEC or other IDs
  24. * @part_probe_types: optional list of MTD parser names to use for
  25. * partitioning
  26. + * @pp_data: optional partition parser data.
  27. *
  28. * @max_transfer_len: option maximum read/write length limitation for
  29. * SPI controllers not able to transfer any length commands.
  30. @@ -30,6 +31,7 @@ struct flash_platform_data {
  31. char *type;
  32. const char **part_probe_types;
  33. + struct mtd_part_parser_data *pp_data;
  34. unsigned int max_transfer_len;
  35. /* we'll likely add more ... use JEDEC IDs, etc */