ar71xx: fix build error due to bad include
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Wed, 22 Aug 2018 11:00:22 +0000 (13:00 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:47:48 +0000 (17:47 +0100)
commit1d38656b868e1cceee8929c97b57a417f72a5767
tree945d8d6ec65d49ca706de348101beeb31d4590d1
parent193b5f2e6981e67d52c0f43dcbb11784566142fe
ar71xx: fix build error due to bad include

While "rawnand.h" is available in kernel 4.14,
the default for this target is kernel 4.9 in which "nand.h" should be used.

Add an extra check to include the correct file depending on kernel version

Fixes these build errors:

drivers/mtd/nand/ar934x_nfc.c:16:10: fatal error: linux/mtd/rawnand.h: No such file or directory
 #include <linux/mtd/rawnand.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Fixes: 318e19ba6755 ("ar71xx: add v4.14 support")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 3b1ea0996f83690695e06d11e0214110b6f7201f)
target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c
target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c