[U-Boot] [PATCH 15/30] w1: Drop dm.h header file

Simon Glass sjg at chromium.org
Sun Oct 27 15:53:55 UTC 2019


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 at chromium.org>
---

 board/atmel/common/board.c | 1 +
 cmd/w1.c                   | 1 +
 include/w1.h               | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c
index c41706c400..eee5c357bd 100644
--- a/board/atmel/common/board.c
+++ b/board/atmel/common/board.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <env.h>
 #include <w1.h>
 #include <w1-eeprom.h>
diff --git a/cmd/w1.c b/cmd/w1.c
index 9c95fcf9cd..c7e2b62bfa 100644
--- a/cmd/w1.c
+++ b/cmd/w1.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <w1.h>
 #include <w1-eeprom.h>
 #include <dm/device-internal.h>
diff --git a/include/w1.h b/include/w1.h
index b958b1c92c..77f439e587 100644
--- a/include/w1.h
+++ b/include/w1.h
@@ -8,7 +8,7 @@
 #ifndef __W1_H
 #define __W1_H
 
-#include <dm.h>
+struct udevice;
 
 #define W1_FAMILY_DS24B33	0x23
 #define W1_FAMILY_DS2431	0x2d
-- 
2.24.0.rc0.303.g954a862665-goog



More information about the U-Boot mailing list