[U-Boot,13/30] sf: Drop dm.h header file from spi_flash.h
diff mbox series

Message ID 20191027155410.187957-13-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot,01/30] lib: Allow crc32 to be disabled.
Related show

Commit Message

Simon Glass Oct. 27, 2019, 3:53 p.m. UTC
This header file should not be included in other header files. Remove it
and use a forward declaration instead.

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

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

Patch
diff mbox series

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