]> 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)
committerSimon Glass <sjg@chromium.org>
Sat, 2 Nov 2024 17:13:59 +0000 (11:13 -0600)
commitcedf9ccaa27828876bc29b1dfc721cea2e5e6dfc
treefcd57ae86314f216f73748dbf935d4ebf47cddb2
parentb84c13f37d19a3605bb6e34d26c2396cc0fffd86
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