Gabor Juhos 2ecc413107 ar71xx: fix invalid pointer dereference in c60_nand_scan_fixup()
Since Linux 4.6, mtd->priv no longer points to the NAND specific
structure. Under 4.9 it contains NULL, thus using it to access
the fields of the nand_chip structure causes an invalid pointer
dereference.

Update the code to use the mtd_to_nand() helper under 4.9 to obtain
the address of the chip specific data.

Compile tested only.

Fixes: 7bbf4117c6fe ("ar71xx: Add kernel 4.9 support")
Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
2017-12-15 23:57:41 +01:00
..
2016-09-04 13:35:11 +02:00
2017-11-22 20:45:52 +01:00
2017-10-28 13:59:03 +02:00
2017-10-22 15:17:42 +02:00
2017-06-29 04:46:59 +02:00
2017-11-22 20:45:52 +01:00
2017-12-07 01:41:09 +02:00
2017-12-07 01:41:09 +02:00
2017-11-22 20:45:52 +01:00
2017-10-25 09:22:13 +02:00
2017-10-18 21:46:05 +02:00
2017-12-08 19:41:18 +01:00
2017-10-24 18:39:17 -07:00
2017-12-07 01:41:09 +02:00
2017-01-10 12:49:34 +01:00
2017-11-24 14:09:11 +02:00