diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-27 16:16:10 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-29 09:06:50 -0400 |
commit | 5bd34c091a044d130601370c370f84b1c59f1627 (patch) | |
tree | 8b08012a9a30186a8805d506f8438e2944f5f31b /drivers/mtd/nand/diskonchip.c | |
parent | ff268fb8791cf18df536113355d7184007c269d9 (diff) |
[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>
Diffstat (limited to 'drivers/mtd/nand/diskonchip.c')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 82262a4a4208..463e12ced1b3 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -1058,8 +1058,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, | |||
1058 | * safer. The only problem with it is that any code that parses oobfree must | 1058 | * safer. The only problem with it is that any code that parses oobfree must |
1059 | * be able to handle out-of-order segments. | 1059 | * be able to handle out-of-order segments. |
1060 | */ | 1060 | */ |
1061 | static struct nand_oobinfo doc200x_oobinfo = { | 1061 | static struct nand_ecclayout doc200x_oobinfo = { |
1062 | .useecc = MTD_NANDECC_AUTOPLACE, | ||
1063 | .eccbytes = 6, | 1062 | .eccbytes = 6, |
1064 | .eccpos = {0, 1, 2, 3, 4, 5}, | 1063 | .eccpos = {0, 1, 2, 3, 4, 5}, |
1065 | .oobfree = {{8, 8}, {6, 2}} | 1064 | .oobfree = {{8, 8}, {6, 2}} |
@@ -1662,7 +1661,7 @@ static int __init doc_probe(unsigned long physadr) | |||
1662 | nand->ecc.calculate = doc200x_calculate_ecc; | 1661 | nand->ecc.calculate = doc200x_calculate_ecc; |
1663 | nand->ecc.correct = doc200x_correct_data; | 1662 | nand->ecc.correct = doc200x_correct_data; |
1664 | 1663 | ||
1665 | nand->autooob = &doc200x_oobinfo; | 1664 | nand->ecc.layout = &doc200x_oobinfo; |
1666 | nand->ecc.mode = NAND_ECC_HW_SYNDROME; | 1665 | nand->ecc.mode = NAND_ECC_HW_SYNDROME; |
1667 | nand->ecc.size = 512; | 1666 | nand->ecc.size = 512; |
1668 | nand->ecc.bytes = 6; | 1667 | nand->ecc.bytes = 6; |