Skip to content
Snippets Groups Projects
Commit ad09ab2e authored by Valeriy Glushkov's avatar Valeriy Glushkov Committed by Scott Wood
Browse files

NAND: Fixed invalid pointers to static relocated chip names


Dear Wolfgang,

You are right, the patch was ugly.
The new one seems to be better.

Signed-off-by: default avatarValeriy Glushkov <gvv@lstec.com>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent 5a9427dc
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,8 @@
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#endif
DECLARE_GLOBAL_DATA_PTR;
int nand_curr_device = -1;
nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
......@@ -46,6 +48,8 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
if (nand_scan(mtd, 1) == 0) {
if (!mtd->name)
mtd->name = (char *)default_nand_name;
else
mtd->name += gd->reloc_off;
} else
mtd->name = NULL;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment