summaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:27:00 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:54 -0700
commitf8a85449ef3e0963add728815771ccc09aa99875 (patch)
treedff087eeb955e883a0e12f597acdc734961bdb4c /test/dm
parent72ebfe86fac2ca0a0e1af9fe1eaa3a634e3e17a1 (diff)
downloadu-boot-imx-f8a85449ef3e0963add728815771ccc09aa99875.zip
u-boot-imx-f8a85449ef3e0963add728815771ccc09aa99875.tar.gz
u-boot-imx-f8a85449ef3e0963add728815771ccc09aa99875.tar.bz2
dm: core: Allocate platform data when binding a device
When using allocated platform data, allocate it when we bind the device. This makes it possible to fill in this information before the device is probed. This fits with the platform data model (when not using device tree), since platform data exists at bind-time. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/test-fdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index cd2c389..dc4ebf9 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -143,12 +143,12 @@ static int dm_test_fdt(struct dm_test_state *dms)
/* These are num_devices compatible root-level device tree nodes */
ut_asserteq(num_devices, list_count_items(&uc->dev_head));
- /* Each should have no platdata / priv */
+ /* Each should have platform data but no private data */
for (i = 0; i < num_devices; i++) {
ret = uclass_find_device(UCLASS_TEST_FDT, i, &dev);
ut_assert(!ret);
ut_assert(!dev_get_priv(dev));
- ut_assert(!dev->platdata);
+ ut_assert(dev->platdata);
}
ut_assertok(dm_check_devices(dms, num_devices));