lantiq: switch to kernel 4.9
[openwrt/staging/stintel.git] / target / linux / lantiq / patches-4.4 / 0047-mtd-plat-nand-pass-of-node.patch
1 --- a/drivers/mtd/nand/plat_nand.c
2 +++ b/drivers/mtd/nand/plat_nand.c
3 @@ -31,6 +31,7 @@ static int plat_nand_probe(struct platfo
4 {
5 struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev);
6 struct mtd_part_parser_data ppdata;
7 + struct device_node *np = pdev->dev.of_node;
8 struct plat_nand_data *data;
9 struct resource *res;
10 const char **part_types;
11 @@ -58,6 +59,7 @@ static int plat_nand_probe(struct platfo
12 return PTR_ERR(data->io_base);
13
14 data->chip.priv = &data;
15 + data->chip.flash_node = np;
16 data->mtd.priv = &data->chip;
17 data->mtd.dev.parent = &pdev->dev;
18
19 @@ -105,7 +107,7 @@ static int plat_nand_probe(struct platfo
20
21 part_types = pdata->chip.part_probe_types;
22
23 - ppdata.of_node = pdev->dev.of_node;
24 + ppdata.of_node = np;
25 err = mtd_device_parse_register(&data->mtd, part_types, &ppdata,
26 pdata->chip.partitions,
27 pdata->chip.nr_partitions);