diff mbox series

[23/31] nand: Drop dm.h header file

Message ID 20200719161601.495421-24-sjg@chromium.org
State Accepted
Commit 4a953b1f7e94f757799c9e6e4066976e92f41fd9
Delegated to: Tom Rini
Headers show
Series dm: Avoid including dm.h in header files | expand

Commit Message

Simon Glass July 19, 2020, 4:15 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>
---

 drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c | 1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Tom Rini Aug. 4, 2020, 3:05 p.m. UTC | #1
On Sun, Jul 19, 2020 at 10:15:53AM -0600, 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
index c58679834e..a6acf556bc 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
@@ -1,6 +1,7 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <dm.h>
 #include <malloc.h>
 #include <dm/devres.h>
 #include "brcmnand_compat.h"
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
index 6f9bec7085..52711d4978 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
@@ -3,8 +3,8 @@ 
 #ifndef __BRCMNAND_COMPAT_H
 #define __BRCMNAND_COMPAT_H
 
-#include <clk.h>
-#include <dm.h>
+struct clk;
+struct udevice;
 
 char *devm_kasprintf(struct udevice *dev, gfp_t gfp, const char *fmt, ...);