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

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

Merge "mtd: msm_qpic_nand: Support for multi page read - fix"

parents 39291aa3 43ccce02
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1838,6 +1838,7 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
	ops.retlen = 0;
	ops.ooblen = 0;
	ops.oobbuf = NULL;
	*retlen = 0;

	if (!(from & (mtd->writesize - 1)) && !(len % mtd->writesize)) {
		/*
@@ -1849,7 +1850,7 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
			ops.len = mtd->writesize;

			for (;;) {
				ops.datbuf = buf;
				ops.datbuf = (uint8_t *)buf;
				ret = msm_nand_read_oob(mtd, from, &ops);
				if (ret < 0)
					break;
@@ -1872,13 +1873,13 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
			}
		} else {
			ops.len = len;
			ops.datbuf = buf;
			ops.datbuf = (uint8_t *)buf;
			ret =  msm_nand_read_oob(mtd, from, &ops);
			*retlen = ops.retlen;
		}
	} else {
		ops.len = len;
		ops.datbuf = buf;
		ops.datbuf = (uint8_t *)buf;
		ret = msm_nand_read_partial_page(mtd, from, &ops);
		*retlen = ops.retlen;
	}