brcm63xx: add preliminary support for 3.13
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.13 / 412-MTD-physmap-allow-passing-pp_data.patch
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 ---
7 drivers/mtd/maps/physmap.c | 4 +++-
8 include/linux/mtd/physmap.h | 1 +
9 2 files changed, 4 insertions(+), 1 deletion(-)
10
11 --- a/drivers/mtd/maps/physmap.c
12 +++ b/drivers/mtd/maps/physmap.c
13 @@ -96,6 +96,7 @@ static int physmap_flash_probe(struct pl
14 {
15 struct physmap_flash_data *physmap_data;
16 struct physmap_flash_info *info;
17 + struct mtd_part_parser_data *pp_data;
18 const char * const *probe_type;
19 const char * const *part_types;
20 int err = 0;
21 @@ -187,8 +188,9 @@ static int physmap_flash_probe(struct pl
22 spin_lock_init(&info->vpp_lock);
23
24 part_types = physmap_data->part_probe_types ? : part_probe_types;
25 + pp_data = physmap_data->pp_data ? physmap_data->pp_data : NULL;
26
27 - mtd_device_parse_register(info->cmtd, part_types, NULL,
28 + mtd_device_parse_register(info->cmtd, part_types, pp_data,
29 physmap_data->parts, physmap_data->nr_parts);
30 return 0;
31
32 --- a/include/linux/mtd/physmap.h
33 +++ b/include/linux/mtd/physmap.h
34 @@ -31,6 +31,7 @@ struct physmap_flash_data {
35 char *probe_type;
36 struct mtd_partition *parts;
37 const char * const *part_probe_types;
38 + struct mtd_part_parser_data *pp_data;
39 };
40
41 #endif /* __LINUX_MTD_PHYSMAP__ */