]> git.sur5r.net Git - u-boot/commit
dm: core: Add uclass_first/next_device_check()
authorSimon Glass <sjg@chromium.org>
Mon, 24 Apr 2017 02:10:45 +0000 (20:10 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:19 +0000 (10:08 -0600)
commit95ce385a4ad0bb0d0a20f68b2a1f2451584bf3ff
tree29547f9066718ebdd0ab3abbaf6eb9f189d62cda
parent9856157259f4ab55e3d99c9aacc85f08797c8579
dm: core: Add uclass_first/next_device_check()

Sometimes it is useful to iterate through all devices in a uclass and
skip over those which do not work correctly (e.g fail to probe). Add two
new functions to provide this feature.

The caller must check the return value each time to make sure that the
device is valid. But the device pointer is always returned.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/uclass.c
include/dm/uclass.h
test/dm/test-fdt.c