summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2023-01-21 18:02:52 -0600
committerSean Anderson <seanga2@gmail.com>2023-02-12 13:44:20 -0500
commit5a675abfe7c3f12b475cc0a6c9074a9fbe0b6bb6 (patch)
tree7238a9ae0b06ea7d60c82497af56334efee234cb /test
parent2050f824e1367cb227d8e13a91c98577987fe413 (diff)
downloadu-boot-5a675abfe7c3f12b475cc0a6c9074a9fbe0b6bb6.tar.gz
u-boot-5a675abfe7c3f12b475cc0a6c9074a9fbe0b6bb6.tar.bz2
u-boot-5a675abfe7c3f12b475cc0a6c9074a9fbe0b6bb6.zip
reset: Allow reset_get_by_name() with NULL name
This allows devm_reset_control_get(dev, NULL) to work and get the first reset control, which is common in code ported from Linux. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20230122000252.53642-2-samuel@sholland.org
Diffstat (limited to 'test')
-rw-r--r--test/dm/reset.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/dm/reset.c b/test/dm/reset.c
index 9c00452336..e2d6f45623 100644
--- a/test/dm/reset.c
+++ b/test/dm/reset.c
@@ -35,8 +35,7 @@ static int dm_test_reset_base(struct unit_test_state *uts)
/* Get the same reset port in 2 different ways and compare */
ut_assertok(reset_get_by_index(dev, 0, &reset_method1));
- ut_assertok(reset_get_by_index_nodev(dev_ofnode(dev), 0,
- &reset_method1_1));
+ ut_assertok(reset_get_by_name(dev, NULL, &reset_method1_1));
ut_assertok(reset_get_by_index(dev, 1, &reset_method2));
ut_assertok(reset_get_by_index_nodev(dev_ofnode(dev), 1,
&reset_method2_1));