aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 792ea5c26329..abe975c87b90 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -86,6 +86,7 @@ struct nand_pos {
86 * @ooboffs: the OOB offset within the page 86 * @ooboffs: the OOB offset within the page
87 * @ooblen: the number of OOB bytes to read from/write to this page 87 * @ooblen: the number of OOB bytes to read from/write to this page
88 * @oobbuf: buffer to store OOB data in or get OOB data from 88 * @oobbuf: buffer to store OOB data in or get OOB data from
89 * @mode: one of the %MTD_OPS_XXX mode
89 * 90 *
90 * This object is used to pass per-page I/O requests to NAND sub-layers. This 91 * This object is used to pass per-page I/O requests to NAND sub-layers. This
91 * way all useful information are already formatted in a useful way and 92 * way all useful information are already formatted in a useful way and
@@ -106,6 +107,7 @@ struct nand_page_io_req {
106 const void *out; 107 const void *out;
107 void *in; 108 void *in;
108 } oobbuf; 109 } oobbuf;
110 int mode;
109}; 111};
110 112
111/** 113/**
@@ -599,6 +601,7 @@ static inline void nanddev_io_iter_init(struct nand_device *nand,
599{ 601{
600 struct mtd_info *mtd = nanddev_to_mtd(nand); 602 struct mtd_info *mtd = nanddev_to_mtd(nand);
601 603
604 iter->req.mode = req->mode;
602 iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos); 605 iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos);
603 iter->req.ooboffs = req->ooboffs; 606 iter->req.ooboffs = req->ooboffs;
604 iter->oobbytes_per_page = mtd_oobavail(mtd, req); 607 iter->oobbytes_per_page = mtd_oobavail(mtd, req);