diff options
author | Brian Norris <computersforpeace@gmail.com> | 2013-08-08 20:16:36 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 16:40:49 -0400 |
commit | d6a95080a2fb9fb38b4f279e97e508f6151c1000 (patch) | |
tree | 4f0a64165871aab680b94e9bf4798a56c046a640 /drivers/mtd/nand/nand_base.c | |
parent | ed202940335e3f9930509025e3d75721e564baca (diff) |
mtd: nand: fixup kerneldoc, rename parameter
First, the function argument is 'offset' not 'column'.
Second, the 'data_buf' name is inconsistent with the rest of this file.
Just use 'buf'.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Gupta, Pekon <pekon@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 80394ccc2232..7ed4841327f2 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -1980,13 +1980,14 @@ static int nand_write_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
1980 | * nand_write_subpage_hwecc - [REPLACABLE] hardware ECC based subpage write | 1980 | * nand_write_subpage_hwecc - [REPLACABLE] hardware ECC based subpage write |
1981 | * @mtd: mtd info structure | 1981 | * @mtd: mtd info structure |
1982 | * @chip: nand chip info structure | 1982 | * @chip: nand chip info structure |
1983 | * @column: column address of subpage within the page | 1983 | * @offset: column address of subpage within the page |
1984 | * @data_len: data length | 1984 | * @data_len: data length |
1985 | * @buf: data buffer | ||
1985 | * @oob_required: must write chip->oob_poi to OOB | 1986 | * @oob_required: must write chip->oob_poi to OOB |
1986 | */ | 1987 | */ |
1987 | static int nand_write_subpage_hwecc(struct mtd_info *mtd, | 1988 | static int nand_write_subpage_hwecc(struct mtd_info *mtd, |
1988 | struct nand_chip *chip, uint32_t offset, | 1989 | struct nand_chip *chip, uint32_t offset, |
1989 | uint32_t data_len, const uint8_t *data_buf, | 1990 | uint32_t data_len, const uint8_t *buf, |
1990 | int oob_required) | 1991 | int oob_required) |
1991 | { | 1992 | { |
1992 | uint8_t *oob_buf = chip->oob_poi; | 1993 | uint8_t *oob_buf = chip->oob_poi; |
@@ -2005,20 +2006,20 @@ static int nand_write_subpage_hwecc(struct mtd_info *mtd, | |||
2005 | chip->ecc.hwctl(mtd, NAND_ECC_WRITE); | 2006 | chip->ecc.hwctl(mtd, NAND_ECC_WRITE); |
2006 | 2007 | ||
2007 | /* write data (untouched subpages already masked by 0xFF) */ | 2008 | /* write data (untouched subpages already masked by 0xFF) */ |
2008 | chip->write_buf(mtd, data_buf, ecc_size); | 2009 | chip->write_buf(mtd, buf, ecc_size); |
2009 | 2010 | ||
2010 | /* mask ECC of un-touched subpages by padding 0xFF */ | 2011 | /* mask ECC of un-touched subpages by padding 0xFF */ |
2011 | if ((step < start_step) || (step > end_step)) | 2012 | if ((step < start_step) || (step > end_step)) |
2012 | memset(ecc_calc, 0xff, ecc_bytes); | 2013 | memset(ecc_calc, 0xff, ecc_bytes); |
2013 | else | 2014 | else |
2014 | chip->ecc.calculate(mtd, data_buf, ecc_calc); | 2015 | chip->ecc.calculate(mtd, buf, ecc_calc); |
2015 | 2016 | ||
2016 | /* mask OOB of un-touched subpages by padding 0xFF */ | 2017 | /* mask OOB of un-touched subpages by padding 0xFF */ |
2017 | /* if oob_required, preserve OOB metadata of written subpage */ | 2018 | /* if oob_required, preserve OOB metadata of written subpage */ |
2018 | if (!oob_required || (step < start_step) || (step > end_step)) | 2019 | if (!oob_required || (step < start_step) || (step > end_step)) |
2019 | memset(oob_buf, 0xff, oob_bytes); | 2020 | memset(oob_buf, 0xff, oob_bytes); |
2020 | 2021 | ||
2021 | data_buf += ecc_size; | 2022 | buf += ecc_size; |
2022 | ecc_calc += ecc_bytes; | 2023 | ecc_calc += ecc_bytes; |
2023 | oob_buf += oob_bytes; | 2024 | oob_buf += oob_bytes; |
2024 | } | 2025 | } |