]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: core: Add a function to see if a device exists
authorSimon Glass <sjg@chromium.org>
Sat, 19 Oct 2024 15:21:49 +0000 (09:21 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 4 Nov 2024 03:27:12 +0000 (21:27 -0600)
commit79b3e9d25b3f96fdf66f9d7dc6a14fdce9a15f93
tree60492674ad4706c755befa65e5ccfe9250a17c86
parent2ca32cbb837ff0a1e906a99c518a03852e1d24e8
dm: core: Add a function to see if a device exists

All the uclass functions for finding a device end up creating a uclass
if it doesn't exist. Add a function which instead returns NULL in this
case.

This is useful when in the 'unbind' path, since we don't want to undo
any unbinding which has already happened.

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