[U-Boot] [PATCH 27/30] nand: Drop dm.h header file

Simon Glass sjg at chromium.org
Sun Oct 27 15:54:07 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>
---

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

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
index 96b27e6e5a..01c2b922c8 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
@@ -1,6 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <clk.h>
+#include <dm.h>
+#include <linux/err.h>
+
 #include "brcmnand_compat.h"
 
 struct clk *devm_clk_get(struct udevice *dev, const char *id)
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.h
index 02cab0f828..408b2d809a 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;
 
 struct clk *devm_clk_get(struct udevice *dev, const char *id);
 int clk_prepare_enable(struct clk *clk);
-- 
2.24.0.rc0.303.g954a862665-goog



More information about the U-Boot mailing list