projects
/
openwrt
/
staging
/
dedeckeh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ar71xx: fix invalid pointer dereference in rb95x_nand_scan_fixup()
[openwrt/staging/dedeckeh.git]
/
target
/
linux
/
ar71xx
/
files
/
arch
/
mips
/
ath79
/
mach-rb95x.c
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
index 9eaeaa7f9db595094ec9964dd05d36932e1238c1..5e24694d5cc52fa5b92e55b89236d8fcb212fa6c 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
+++ b/
target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
@@
-207,7
+207,11
@@
static const struct mtd_ooblayout_ops rb95x_nand_ecclayout_ops = {
static int rb95x_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 /* < 4.6.0 */
if (mtd->writesize == 512) {
/*