test: Add udevice declaration to avoid build error
authorSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 17:53:08 +0000 (06:53 +1300)
committerTom Rini <trini@konsulko.com>
Sun, 28 Mar 2021 21:30:35 +0000 (17:30 -0400)
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

index 6ac6672..c5a9610 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __DM_TEST_H
 #define __DM_TEST_H
 
+struct udevice;
+
 /**
  * struct dm_test_cdata - configuration data for test instance
  *