]> git.dujemihanovic.xyz Git - u-boot.git/commit
uclass: add uclass_find_device_by_phandle_id() helper
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 13 Apr 2023 15:16:11 +0000 (17:16 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Apr 2023 17:48:09 +0000 (11:48 -0600)
commit6ebb357a6a16fe4b61fae3866f80b967e8231f7e
tree0e3176b7d2230b5d7dd6ccaa93a64a0cdf96ea59
parent763f0a1f0d2b3ee0b3f7248dee874c3e65e93345
uclass: add uclass_find_device_by_phandle_id() helper

The functions uclass_find_device_by_phandle() and
uclass_get_device_by_phandle_id() both loop over a given uclass
looking for a device with a given phandle. Factor that out to a common
helper.

For now, there are no (known potential) users of the new helper
outside uclass.c, so make it static.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fix warning on sandbox_spl; fix code style:
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/uclass.c