aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c6
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 577fb0eee0..223b505ff4 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;
}