[Yaffs] [PATCH 1/2] mtdif: update an include file name

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Martin Kaiser
Date:  
To: yaffs
CC: Martin Kaiser
Old-Topics: [Yaffs] [PATCH 0/2] small fixes to compile yaffs2 with Linux 4.14-rc1
Subject: [Yaffs] [PATCH 1/2] mtdif: update an include file name
From: Martin Kaiser <>

linux/mtd/nand.h was renamed to rawnand.h in Linux 4.14-rc1. Set the
name depending on the kernel version.

Signed-off-by: Martin Kaiser <>
---
yaffs_mtdif_multi.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/yaffs_mtdif_multi.c b/yaffs_mtdif_multi.c
index 7c01461..5b06689 100644
--- a/yaffs_mtdif_multi.c
+++ b/yaffs_mtdif_multi.c
@@ -18,7 +18,11 @@
#include "linux/mtd/mtd.h"
#include "linux/types.h"
#include "linux/time.h"
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+#include "linux/mtd/rawnand.h"
+#else
#include "linux/mtd/nand.h"
+#endif
#include "linux/kernel.h"
#include "linux/version.h"
#include "linux/types.h"
--
2.1.4