aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorVitaly Wool <vwool@ru.mvista.com>2007-03-06 08:56:34 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-03-08 04:17:43 -0500
commit1f92267c51a514f35ad5b0fd46cb099c0980b679 (patch)
tree06101742bffb98e305dcf9db208e55ed89182d44 /drivers/mtd
parenteee8abe5de9cbd936b51db292c8d3c406b0e79e7 (diff)
[MTD] [NAND] make oobavail public
During the MTD rework the oobavail parameter of mtd_info structure has become private. This is not quite correct in terms of integrity and logic. If we have means to write to OOB area, then we'd like to know upfront how many bytes out of OOB are spare per page to be able to adapt to specific cases. The patch inlined adds the public oobavail parameter. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdconcat.c1
-rw-r--r--drivers/mtd/mtdpart.c1
-rw-r--r--drivers/mtd/nand/nand_base.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 880580c44e01..41844ea02462 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -727,6 +727,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
727 concat->mtd.erasesize = subdev[0]->erasesize; 727 concat->mtd.erasesize = subdev[0]->erasesize;
728 concat->mtd.writesize = subdev[0]->writesize; 728 concat->mtd.writesize = subdev[0]->writesize;
729 concat->mtd.oobsize = subdev[0]->oobsize; 729 concat->mtd.oobsize = subdev[0]->oobsize;
730 concat->mtd.oobavail = subdev[0]->oobavail;
730 if (subdev[0]->writev) 731 if (subdev[0]->writev)
731 concat->mtd.writev = concat_writev; 732 concat->mtd.writev = concat_writev;
732 if (subdev[0]->read_oob) 733 if (subdev[0]->read_oob)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 633def3fb087..01e4afff42b0 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -338,6 +338,7 @@ int add_mtd_partitions(struct mtd_info *master,
338 slave->mtd.size = parts[i].size; 338 slave->mtd.size = parts[i].size;
339 slave->mtd.writesize = master->writesize; 339 slave->mtd.writesize = master->writesize;
340 slave->mtd.oobsize = master->oobsize; 340 slave->mtd.oobsize = master->oobsize;
341 slave->mtd.oobavail = master->oobavail;
341 slave->mtd.subpage_sft = master->subpage_sft; 342 slave->mtd.subpage_sft = master->subpage_sft;
342 343
343 slave->mtd.name = parts[i].name; 344 slave->mtd.name = parts[i].name;
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index acaf97bc80d1..6af37b8cff65 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2524,6 +2524,7 @@ int nand_scan_tail(struct mtd_info *mtd)
2524 for (i = 0; chip->ecc.layout->oobfree[i].length; i++) 2524 for (i = 0; chip->ecc.layout->oobfree[i].length; i++)
2525 chip->ecc.layout->oobavail += 2525 chip->ecc.layout->oobavail +=
2526 chip->ecc.layout->oobfree[i].length; 2526 chip->ecc.layout->oobfree[i].length;
2527 mtd->oobavail = chip->ecc.layout->oobavail;
2527 2528
2528 /* 2529 /*
2529 * Set the number of read / write steps for one page depending on ECC 2530 * Set the number of read / write steps for one page depending on ECC
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 7f1cb6e5dccb..621c3f8ec27b 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2367,6 +2367,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
2367 for (i = 0; this->ecclayout->oobfree[i].length; i++) 2367 for (i = 0; this->ecclayout->oobfree[i].length; i++)
2368 this->ecclayout->oobavail += 2368 this->ecclayout->oobavail +=
2369 this->ecclayout->oobfree[i].length; 2369 this->ecclayout->oobfree[i].length;
2370 mtd->oobavail = this->ecclayout->oobavail;
2370 2371
2371 mtd->ecclayout = this->ecclayout; 2372 mtd->ecclayout = this->ecclayout;
2372 2373