From: Stefan Roese Date: Thu, 27 Nov 2008 13:11:37 +0000 (+0100) Subject: OneNAND: Add missing mtd info struct before calling onenand_erase() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5e46b1e54112f4b7fd5185665e571510132c12a7;p=project%2Fbcm63xx%2Fu-boot.git OneNAND: Add missing mtd info struct before calling onenand_erase() Without this patch "saveenv" crashes when MTD partitions are enabled (e.g. for use in UBI) via CONFIG_MTD_PARTITIONS. Signed-off-by: Stefan Roese Signed-off-by: Scott Wood --- diff --git a/common/env_onenand.c b/common/env_onenand.c index 3c65b3e487..dbccc79125 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -97,6 +97,7 @@ int saveenv(void) instr.len = CONFIG_ENV_SIZE; instr.addr = env_addr; + instr.mtd = &onenand_mtd; if (onenand_erase(&onenand_mtd, &instr)) { printf("OneNAND: erase failed at 0x%08lx\n", env_addr); return 1;