[PATCH] remove deprecated oobinfo retrieval

Boris Brezillon boris.brezillon at free-electrons.com
Mon Jan 25 22:42:16 PST 2016


From: Boris BREZILLON <boris.brezillon at free-electrons.com>

This remove OOB info retrieval, which is not used anywhere else in the code
and can generate errors when called on newer NAND that have more than 32
bytes of ECC or 16 bytes available for user usage in the OOB area.

Signed-off-by: Boris BREZILLON <boris.brezillon at free-electrons.com>
---
 src/mtd.c | 8 --------
 src/mtd.h | 1 -
 2 files changed, 9 deletions(-)

diff --git a/src/mtd.c b/src/mtd.c
index 02af33b..cf8428a 100644
--- a/src/mtd.c
+++ b/src/mtd.c
@@ -700,14 +700,6 @@ struct mtd_data *mtd_open(const struct mtd_config *cfg, int flags)
 			goto out;
 		}
 
-		/* keep original oobinfo */
-		r = ioctl(mp->fd, MEMGETOOBSEL, &mp->old_oobinfo);
-		if (r != 0) {
-			fprintf(stderr, "mtd: device %s can't ioctl MEMGETOOBSEL: %d\n",
-					mp->name, r);
-			goto out;
-		}
-
 		/* get info about the mtd device (partition) */
 		r = ioctl(mp->fd, MEMGETINFO, miu);
 		if (r != 0) {
diff --git a/src/mtd.h b/src/mtd.h
index 99d7887..946a49c 100644
--- a/src/mtd.h
+++ b/src/mtd.h
@@ -112,7 +112,6 @@ struct mtd_part {
 	int nrbad;
 
         int oobinfochanged;
-	struct nand_oobinfo old_oobinfo;
 	int ecc;
 };
 
-- 
1.9.1



More information about the linux-mtd mailing list