diff options
author | Roger Pueyo Centelles <roger.pueyo@guifi.net> | 2017-12-21 15:51:10 +0100 |
---|---|---|
committer | Daniel Golle <dangowrt@users.noreply.github.com> | 2017-12-21 17:06:54 +0100 |
commit | 8927446dae819c45cee178629dca612c90edd886 (patch) | |
tree | 3eac21428a319145a30df83ec5c46eb3c459ffee /target | |
parent | dda2229c52c78d177a417e261d3dd912f65101fe (diff) | |
download | mtk-20170518-8927446dae819c45cee178629dca612c90edd886.zip mtk-20170518-8927446dae819c45cee178629dca612c90edd886.tar.gz mtk-20170518-8927446dae819c45cee178629dca612c90edd886.tar.bz2 |
ar71xx: fix rb922gs_nand_scan_fixup()
Apply code from commits 9e1bc27e6d67fa29791eb0fac5e5f0066d12a761
(ar71xx: Fix UBIFS work on Mikrotik RB95x devices) and
665bb2749906aff4d4ec607a308353fa30cb1b3a (ar71xx: fix invalid pointer
dereference in rb95x_nand_scan_fixup()) to RB92x devices too.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c index 577fb0e..223b505 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c @@ -195,7 +195,9 @@ static int rb922gs_nand_scan_fixup(struct mtd_info *mtd) { #if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0) struct nand_chip *chip = mtd->priv; -#endif +#else + struct nand_chip *chip = mtd_to_nand(mtd); +#endif /* < 4.6.0 */ if (mtd->writesize == 512) { /* @@ -209,6 +211,8 @@ static int rb922gs_nand_scan_fixup(struct mtd_info *mtd) #endif } + chip->options = NAND_NO_SUBPAGE_WRITE; + return 0; } |