lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.23 / 080-mtd_plat_nand_chip_fixup.patch
1 --- a/include/linux/mtd/nand.h
2 +++ b/include/linux/mtd/nand.h
3 @@ -572,6 +572,7 @@
4 int chip_delay;
5 unsigned int options;
6 const char **part_probe_types;
7 + int (*chip_fixup)(struct mtd_info *mtd);
8 void *priv;
9 };
10
11 --- a/drivers/mtd/nand/plat_nand.c
12 +++ b/drivers/mtd/nand/plat_nand.c
13 @@ -70,7 +70,18 @@
14 platform_set_drvdata(pdev, data);
15
16 /* Scan to find existance of the device */
17 - if (nand_scan(&data->mtd, 1)) {
18 + if (nand_scan_ident(&data->mtd, 1)) {
19 + res = -ENXIO;
20 + goto out;
21 + }
22 +
23 + if (pdata->chip.chip_fixup) {
24 + res = pdata->chip.chip_fixup(&data->mtd);
25 + if (res)
26 + goto out;
27 + }
28 +
29 + if (nand_scan_tail(&data->mtd)) {
30 res = -ENXIO;
31 goto out;
32 }
This page took 0.042886 seconds and 5 git commands to generate.