[kernel] add switch driver for Lantiq PSB6970
[openwrt.git] / target / linux / generic / patches-2.6.34 / 080-mtd_plat_nand_chip_fixup.patch
index 16ce76ce8cae370fab1a50c989cd207b5eed8121..04d63fad66e40a12e15ca8e4560b6898d7a18f17 100644 (file)
        }
  
        /* Scan to find existance of the device */
--      if (nand_scan(&data->mtd, 1)) {
-+      if (nand_scan_ident(&data->mtd, 1)) {
-+              res = -ENXIO;
+-      if (nand_scan(&data->mtd, pdata->chip.nr_chips)) {
++      if (nand_scan_ident(&data->mtd, pdata->chip.nr_chips)) {
++              err = -ENXIO;
 +              goto out;
 +      }
 +
 +      if (pdata->chip.chip_fixup) {
-+              res = pdata->chip.chip_fixup(&data->mtd);
-+              if (res)
++              err = pdata->chip.chip_fixup(&data->mtd);
++              if (err)
 +                      goto out;
 +      }
 +