diff mbox series

test: Add udevice declaration to avoid build error

Message ID 20210327175308.1532024-1-sjg@chromium.org
State Accepted
Commit 3c2503ee3327ea93a175768bafbaddff182c1c08
Delegated to: Tom Rini
Headers show
Series test: Add udevice declaration to avoid build error | expand

Commit Message

Simon Glass March 27, 2021, 5:53 p.m. UTC
When including this file on a board other than sandbox (e.g by enabling
UNIT_TEST and CMD_SETEXPR) an results. Fix it by declaring struct udevice
first.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---

 include/dm/test.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini March 29, 2021, 12:29 a.m. UTC | #1
On Sun, Mar 28, 2021 at 06:53:08AM +1300, Simon Glass wrote:

> When including this file on a board other than sandbox (e.g by enabling
> UNIT_TEST and CMD_SETEXPR) an results. Fix it by declaring struct udevice
> first.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

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

Patch

diff --git a/include/dm/test.h b/include/dm/test.h
index fe1cc2e278c..59c51d6b30c 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -6,6 +6,8 @@ 
 #ifndef __DM_TEST_H
 #define __DM_TEST_H
 
+struct udevice;
+
 /**
  * struct dm_test_cdata - configuration data for test instance
  *