ar71xx: fix build error due to bad include
[openwrt/staging/stintel.git] / target / linux / ar71xx / files / drivers / mtd / nand / rb91x_nand.c
index ac50b87fd5c4883624f11de06e053145cc690914..1f193f196c65817a0731c8c98218a3eaca46c281 100644 (file)
@@ -8,18 +8,21 @@
  *  by the Free Software Foundation.
  */
 
+#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/module.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
+#include <linux/mtd/nand.h>
+#else
 #include <linux/mtd/rawnand.h>
-#include <linux/mtd/mtd.h>
+#endif#include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/platform_data/rb91x_nand.h>
-#include <linux/version.h>
 
 #include <asm/mach-ath79/ar71xx_regs.h>
 #include <asm/mach-ath79/ath79.h>