[PATCH v2 15/41] dm: core: Add a way to count the devices in a uclass

Simon Glass sjg at chromium.org
Wed Nov 24 23:22:22 CET 2021


Add a function that returns the number of devices in a uclass. This can be
helpful in sizing an array that needs to hold a list of them.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/core/uclass.c | 12 ++++++++++++
 include/dm/uclass.h   |  8 ++++++++
 2 files changed, 20 insertions(+)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list