[U-Boot] [PATCH v6 06/31] mtd: fix build issue with includes

Miquel Raynal miquel.raynal at bootlin.com
Thu Aug 16 15:30:04 UTC 2018


Fix build errors produced by mtd.h and dm/device.h if not included in
the right order.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
Reviewed-by: Jagan Teki <jagan at openedev.com>
---
 include/linux/mtd/mtd.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 73b19b57b1..272c646f9d 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -21,6 +21,9 @@
 #include <mtd/mtd-abi.h>
 #include <linux/errno.h>
 #include <div64.h>
+#if IS_ENABLED(CONFIG_DM)
+#include <dm/device.h>
+#endif
 
 #define MAX_MTD_DEVICES 32
 #endif
-- 
2.17.1



More information about the U-Boot mailing list