|
@@ -256,7 +256,9 @@ static int rb2011_nand_scan_fixup(struct mtd_info *mtd)
|
|
|
{
|
|
{
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)
|
|
|
struct nand_chip *chip = mtd->priv;
|
|
struct nand_chip *chip = mtd->priv;
|
|
|
-#endif
|
|
|
|
|
|
|
+#else
|
|
|
|
|
+ struct nand_chip *chip = mtd_to_nand(mtd);
|
|
|
|
|
+#endif /* < 4.6.0 */
|
|
|
|
|
|
|
|
if (mtd->writesize == 512) {
|
|
if (mtd->writesize == 512) {
|
|
|
/*
|
|
/*
|
|
@@ -270,6 +272,8 @@ static int rb2011_nand_scan_fixup(struct mtd_info *mtd)
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ chip->options = NAND_NO_SUBPAGE_WRITE;
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|