summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/tmio_nand.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-31 10:44:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-31 10:44:28 +0300
commit910cc9537302caddc9777cf3ae2f5582730380c9 (patch)
tree0dd42f4dd712fb6901b4f8c12f85508a7ad5b1ef /drivers/mtd/nand/raw/tmio_nand.c
parentfad92b11047a748c996ebd6cfb164a63814eeb2e (diff)
parent8124c8a6b35386f73523d27eacb71b5364a68c4c (diff)
downloadlinux-910cc9537302caddc9777cf3ae2f5582730380c9.tar.xz
Merge 5.13-rc4 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd/nand/raw/tmio_nand.c')
-rw-r--r--drivers/mtd/nand/raw/tmio_nand.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/tmio_nand.c b/drivers/mtd/nand/raw/tmio_nand.c
index de8e919d0ebe..6d93dd31969b 100644
--- a/drivers/mtd/nand/raw/tmio_nand.c
+++ b/drivers/mtd/nand/raw/tmio_nand.c
@@ -34,6 +34,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand-ecc-sw-hamming.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h>
#include <linux/slab.h>
@@ -292,11 +293,12 @@ static int tmio_nand_correct_data(struct nand_chip *chip, unsigned char *buf,
int r0, r1;
/* assume ecc.size = 512 and ecc.bytes = 6 */
- r0 = rawnand_sw_hamming_correct(chip, buf, read_ecc, calc_ecc);
+ r0 = ecc_sw_hamming_correct(buf, read_ecc, calc_ecc,
+ chip->ecc.size, false);
if (r0 < 0)
return r0;
- r1 = rawnand_sw_hamming_correct(chip, buf + 256, read_ecc + 3,
- calc_ecc + 3);
+ r1 = ecc_sw_hamming_correct(buf + 256, read_ecc + 3, calc_ecc + 3,
+ chip->ecc.size, false);
if (r1 < 0)
return r1;
return r0 + r1;