[PATCH v2 1/4] cmd: nand: bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB

david regan dregan at broadcom.com
Thu Aug 14 20:04:55 CEST 2025


bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB since MTD_OOB_AUTO does not exist

Fixes: dfe64e2c8973 ("mtd: resync with Linux-3.7.1")
Signed-off-by: david regan <dregan at broadcom.com>
---
 v2: applied fix to env/nand.c per Quentin request & added Fixes tag
---
 cmd/nand.c | 2 +-
 env/nand.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/nand.c b/cmd/nand.c
index 2f785deeb7f6..e09e145bc2d8 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -412,7 +412,7 @@ int do_nand_env_oob(struct cmd_tbl *cmdtp, int argc, char *const argv[])
 		}
 
 		ops.datbuf = NULL;
-		ops.mode = MTD_OOB_AUTO;
+		ops.mode = MTD_OPS_AUTO_OOB;
 		ops.ooboffs = 0;
 		ops.ooblen = ENV_OFFSET_SIZE;
 		ops.oobbuf = (void *) oob_buf;
diff --git a/env/nand.c b/env/nand.c
index fdaa903cd612..709f8411eb6d 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -275,7 +275,7 @@ int get_nand_env_oob(struct mtd_info *mtd, unsigned long *result)
 	int ret;
 
 	ops.datbuf	= NULL;
-	ops.mode	= MTD_OOB_AUTO;
+	ops.mode	= MTD_OPS_AUTO_OOB;
 	ops.ooboffs	= 0;
 	ops.ooblen	= ENV_OFFSET_SIZE;
 	ops.oobbuf	= (void *)oob_buf;
-- 
2.43.5



More information about the U-Boot mailing list