Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4535cfd1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mtd:readtest: Allow using MTD_OPS_AUTO_OOB"

parents 90c439dd 1b6286c6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ static int dev = -EINVAL;
module_param(dev, int, S_IRUGO);
MODULE_PARM_DESC(dev, "MTD device number to use");

static int use_auto_oob;
module_param(use_auto_oob, int, S_IRUGO);
MODULE_PARM_DESC(use_auto_oob, "Set use_auto_oob = 1 to use MTD_OPS_AUTO_OOB when writing to oob");

static struct mtd_info *mtd;
static unsigned char *iobuf;
static unsigned char *iobuf1;
@@ -61,7 +65,8 @@ static int read_eraseblock_by_page(int ebnum)
		if (mtd->oobsize) {
			struct mtd_oob_ops ops;

			ops.mode      = MTD_OPS_PLACE_OOB;
			ops.mode      = use_auto_oob ? MTD_OPS_AUTO_OOB :
					MTD_OPS_PLACE_OOB;
			ops.len       = 0;
			ops.retlen    = 0;
			ops.ooblen    = mtd->oobsize;