diff mbox series

[U-Boot,26/30] adc: Drop dm.h header file

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

Commit Message

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

Drop the common.h inclusion also.

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

 drivers/adc/stm32-adc-core.c | 1 +
 drivers/adc/stm32-adc-core.h | 4 ++--
 drivers/adc/stm32-adc.c      | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index 04b6a8a2f5..d61c23b91a 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <dm.h>
 #include <asm/io.h>
 #include <power/regulator.h>
 #include "stm32-adc-core.h"
diff --git a/drivers/adc/stm32-adc-core.h b/drivers/adc/stm32-adc-core.h
index ba0e10e6cc..05968dbcc8 100644
--- a/drivers/adc/stm32-adc-core.h
+++ b/drivers/adc/stm32-adc-core.h
@@ -26,9 +26,9 @@ 
 #define STM32_ADC_MAX_ADCS		3
 #define STM32_ADCX_COMN_OFFSET		0x300
 
-#include <common.h>
 #include <clk.h>
-#include <dm.h>
+
+struct udevice;
 
 /**
  * struct stm32_adc_common - stm32 ADC driver common data (for all instances)
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index 029338e4af..c928980e1d 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -8,6 +8,7 @@ 
 
 #include <common.h>
 #include <adc.h>
+#include <dm.h>
 #include <asm/io.h>
 #include <linux/iopoll.h>
 #include "stm32-adc-core.h"