mirror of
https://github.com/outbackdingo/openwrt.git
synced 2026-02-16 15:40:23 +00:00
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:
committed by
Daniel Golle
parent
dda2229c52
commit
8927446dae
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user