summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
blob: a0b4b4ff366915765fd79256e602229794193beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 7f17dfe9009beb07a3de0e380932a725293829df Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Tue, 1 May 2012 17:33:03 +0200
Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data

---
 drivers/mtd/devices/m25p80.c |    5 +++--
 include/linux/spi/flash.h    |    2 ++
 2 files changed, 5 insertions(+)

--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -276,7 +276,8 @@ static int m25p_probe(struct spi_device
 		return ret;
 
 	return mtd_device_parse_register(&nor->mtd,
-			data ? data->part_probe_types : NULL, NULL,
+			data ? data->part_probe_types : NULL,
+			data ? data->pp_data : NULL,
 			data ? data->parts : NULL,
 			data ? data->nr_parts : 0);
 }
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -12,6 +12,7 @@ struct mtd_part_parser_data;
  *	with chips that can't be queried for JEDEC or other IDs
  * @part_probe_types: optional list of MTD parser names to use for
  *	partitioning
+ * @pp_data: optional partition parser data.
  *
  * @max_transfer_len: option maximum read/write length limitation for
  *	SPI controllers not able to transfer any length commands.
@@ -30,6 +31,7 @@ struct flash_platform_data {
 	char		*type;
 
 	const char	**part_probe_types;
+	struct mtd_part_parser_data *pp_data;
 
 	unsigned int	max_transfer_len;
 	/* we'll likely add more ... use JEDEC IDs, etc */