[MTD] NAND Replace oobinfo by ecclayout
The nand_oobinfo structure is not fitting the newer error correction demands anymore. Replace it by struct nand_ecclayout and fixup the users all over the place. Keep the nand_oobinfo based ioctl for user space compability reasons. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@ -1058,8 +1058,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
|
||||
* safer. The only problem with it is that any code that parses oobfree must
|
||||
* be able to handle out-of-order segments.
|
||||
*/
|
||||
static struct nand_oobinfo doc200x_oobinfo = {
|
||||
.useecc = MTD_NANDECC_AUTOPLACE,
|
||||
static struct nand_ecclayout doc200x_oobinfo = {
|
||||
.eccbytes = 6,
|
||||
.eccpos = {0, 1, 2, 3, 4, 5},
|
||||
.oobfree = {{8, 8}, {6, 2}}
|
||||
@ -1662,7 +1661,7 @@ static int __init doc_probe(unsigned long physadr)
|
||||
nand->ecc.calculate = doc200x_calculate_ecc;
|
||||
nand->ecc.correct = doc200x_correct_data;
|
||||
|
||||
nand->autooob = &doc200x_oobinfo;
|
||||
nand->ecc.layout = &doc200x_oobinfo;
|
||||
nand->ecc.mode = NAND_ECC_HW_SYNDROME;
|
||||
nand->ecc.size = 512;
|
||||
nand->ecc.bytes = 6;
|
||||
|
Reference in New Issue
Block a user