diff mbox series

[U-Boot,06/30] wdt: Drop dm.h header file

Message ID 20191027155410.187957-6-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: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>
---

 include/wdt.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Stefan Roese Oct. 28, 2019, 5:44 a.m. UTC | #1
On 27.10.19 16:53, Simon Glass wrote:
> 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>
> ---
> 
>   include/wdt.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/wdt.h b/include/wdt.h
> index 5698605c02..62f4b34c30 100644
> --- a/include/wdt.h
> +++ b/include/wdt.h
> @@ -6,8 +6,7 @@
>   #ifndef _WDT_H_
>   #define _WDT_H_
>   
> -#include <dm.h>
> -#include <dm/read.h>
> +struct udevice;

I'm not a big fan of forward declarations. But if this helps with
overall cleanup and compile speed:

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
diff mbox series

Patch

diff --git a/include/wdt.h b/include/wdt.h
index 5698605c02..62f4b34c30 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -6,8 +6,7 @@ 
 #ifndef _WDT_H_
 #define _WDT_H_
 
-#include <dm.h>
-#include <dm/read.h>
+struct udevice;
 
 /*
  * Implement a simple watchdog uclass. Watchdog is basically a timer that