summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-15 07:25:25 +0300
committerSimon Glass <sjg@chromium.org>2021-03-26 07:03:08 +0300
commit6ba46a0f21df1804e1c98334215ac57a495d9655 (patch)
tree02717aec71fe74e14c6956a57454a61e1f10cff8 /test
parent8813986dfde89ae2eab2a2315e1d23e4784c3d88 (diff)
downloadu-boot-6ba46a0f21df1804e1c98334215ac57a495d9655.tar.xz
dm: core: Drop device_get_by_driver_info()
This function is now only used in a test. Drop it. Also drop DM_DRVINFO_GET() which was the only purpose for having the function. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/of_platdata.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/dm/of_platdata.c b/test/dm/of_platdata.c
index 93ad572725..d68c591282 100644
--- a/test/dm/of_platdata.c
+++ b/test/dm/of_platdata.c
@@ -142,8 +142,6 @@ static int find_driver_info(struct unit_test_state *uts, struct udevice *parent,
/* Check that every device is recorded in its driver_info struct */
static int dm_test_of_plat_dev(struct unit_test_state *uts)
{
- const struct driver_info *info =
- ll_entry_start(struct driver_info, driver_info);
const int n_ents = ll_entry_count(struct driver_info, driver_info);
bool found[n_ents];
uint i;
@@ -155,18 +153,17 @@ static int dm_test_of_plat_dev(struct unit_test_state *uts)
/* Make sure that the driver entries without devices have no ->dev */
for (i = 0; i < n_ents; i++) {
const struct driver_rt *drt = gd_dm_driver_rt() + i;
- const struct driver_info *entry = info + i;
struct udevice *dev;
if (found[i]) {
/* Make sure we can find it */
ut_assertnonnull(drt->dev);
- ut_assertok(device_get_by_driver_info(entry, &dev));
+ ut_assertok(device_get_by_driver_info_idx(i, &dev));
ut_asserteq_ptr(dev, drt->dev);
} else {
ut_assertnull(drt->dev);
ut_asserteq(-ENOENT,
- device_get_by_driver_info(entry, &dev));
+ device_get_by_driver_info_idx(i, &dev));
}
}