aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
index 7b01af515b..144f5db740 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
@@ -180,7 +180,11 @@ static const struct mtd_ooblayout_ops c60_nand_ecclayout_ops = {
static int c60_nand_scan_fixup(struct mtd_info *mtd)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)
struct nand_chip *chip = mtd->priv;
+#else
+ struct nand_chip *chip = mtd_to_nand(mtd);
+#endif
chip->ecc.size = 512;
chip->ecc.strength = 4;