
2 Jun
2016
2 Jun
'16
2:09 a.m.
On Tue, 2016-05-31 at 14:08 +0200, Heiko Schocher wrote:
@@ -59,6 +64,9 @@ int nand_register(int devnum, struct mtd_info *mtd) * via the mtdcore infrastructure (e.g. ubi). */ add_mtd_device(mtd); +#ifdef CONFIG_MTD_CONCAT
- nand_devices_found++;
+#endif #endif
[snip]
sprintf(c_mtd_name, "nand%d", nand_devices_found);
mtd = mtd_concat_create(nand_info, nand_devices_found,
c_mtd_name);
This assumes that there are no gaps in the NAND numbering (e.g. because some device was optional or failed to init). It would be better to build an array by scanning nand_info[] for non-NULL devices.
-SCott