This header file should not be included in other header files. Remove it
and use a forward declaration instead.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 arch/x86/cpu/ivybridge/sdram.c | 1 +
 include/spi_flash.h            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index 8a58d0383d..d2d51ebca1 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 0b23f57a71..0d302a7938 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -9,10 +9,11 @@
 #ifndef _SPI_FLASH_H_
 #define _SPI_FLASH_H_
 
-#include <dm.h>        /* Because we dereference struct udevice here */
 #include <linux/types.h>
 #include <linux/mtd/spi-nor.h>
 
+struct udevice;
+
 /* by default ENV use the same parameters than SF command */
 #ifndef CONFIG_ENV_SPI_BUS
 # define CONFIG_ENV_SPI_BUS    CONFIG_SF_DEFAULT_BUS
-- 
2.24.0.rc0.303.g954a862665-goog

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to