summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nandsim.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-03-23 11:19:03 +0100
committerBoris Brezillon <boris.brezillon@free-electrons.com>2016-04-19 22:04:49 +0200
commit8ae6bcd1dcea249591b4165bd7f795c4868bc531 (patch)
tree3294f5fc9d3fa487342cffcebf0588379564d18d /drivers/mtd/nand/nandsim.c
parent79082457d71af879922e15f9dedf85384e84c29f (diff)
downloadlinux-8ae6bcd1dcea249591b4165bd7f795c4868bc531.tar.bz2
mtd: nand: nandsim: set ECC algorithm explicitly
This follows recent work on switching to enum nand_ecc_algo and deprecating NAND_ECC_SOFT_BCH. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r--drivers/mtd/nand/nandsim.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 1fd519503bb1..6ff1d8d31ac2 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -2261,6 +2261,7 @@ static int __init ns_init_module(void)
chip->read_buf = ns_nand_read_buf;
chip->read_word = ns_nand_read_word;
chip->ecc.mode = NAND_ECC_SOFT;
+ chip->ecc.algo = NAND_ECC_HAMMING;
/* The NAND_SKIP_BBTSCAN option is necessary for 'overridesize' */
/* and 'badblocks' parameters to work */
chip->options |= NAND_SKIP_BBTSCAN;
@@ -2339,6 +2340,7 @@ static int __init ns_init_module(void)
goto error;
}
chip->ecc.mode = NAND_ECC_SOFT_BCH;
+ chip->ecc.algo = NAND_ECC_BCH;
chip->ecc.size = 512;
chip->ecc.strength = bch;
chip->ecc.bytes = eccbytes;