ar71xx: fix rb922gs_nand_scan_fixup()
Apply code from commits9e1bc27e6d
(ar71xx: Fix UBIFS work on Mikrotik RB95x devices) and665bb27499
(ar71xx: fix invalid pointer dereference in rb95x_nand_scan_fixup()) to RB92x devices too. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
This commit is contained in:
parent
dda2229c52
commit
8927446dae
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue