1 commit a3c1e3b732b3708a80e4035b9d845f3f7c7dd0c9
2 Author: Marc Kleine-Budde <mkl@blackshift.org>
3 Date: Wed Feb 8 20:24:29 2012 +0100
5 mtd: ixp4xx: oops in ixp4xx_flash_probe
7 In commit "c797533 mtd: abstract last MTD partition parser argument" the
8 third argument of "mtd_device_parse_register()" changed from start address
9 of the MTD device to a pointer to a struct.
11 The "ixp4xx_flash_probe()" function was not converted properly, causing
14 This patch fixes the problem by filling the needed information into a
15 "struct mtd_part_parser_data" and passing it to
16 "mtd_device_parse_register()".
18 Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
19 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
20 Cc: stable@kernel.org [3.2+]
21 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
23 --- a/drivers/mtd/maps/ixp4xx.c
24 +++ b/drivers/mtd/maps/ixp4xx.c
25 @@ -182,6 +182,9 @@ static int ixp4xx_flash_probe(struct pla
27 struct flash_platform_data *plat = dev->dev.platform_data;
28 struct ixp4xx_flash_info *info;
29 + struct mtd_part_parser_data ppdata = {
30 + .origin = dev->resource->start,
35 @@ -247,7 +250,7 @@ static int ixp4xx_flash_probe(struct pla
36 /* Use the fast version */
37 info->map.write = ixp4xx_write16;
39 - err = mtd_device_parse_register(info->mtd, probes, dev->resource->start,
40 + err = mtd_device_parse_register(info->mtd, probes, &ppdata,
41 plat->parts, plat->nr_parts);
43 printk(KERN_ERR "Could not parse partitions\n");