
4 Feb
2020
4 Feb
'20
8:31 a.m.
On Tue, Feb 4, 2020 at 8:20 AM Simon Glass sjg@chromium.org wrote:
At present we have uclass_foreach_dev() which requires that uclass_get() be called beforehand to find the uclass. This is good if we suspect that that function might fail, but often we know that the uclass is available.
Add a new helper which does this uclass_get() automatically, so that only the uclass ID is needed.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Add new patch to allow iterating devices without uclass_get()
include/dm/uclass.h | 17 +++++++++++++++++ test/dm/test-fdt.c | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+)
Reviewed-by: Bin Meng bmeng.cn@gmail.com