commit | 832c3f0242ae6b5278648b638d45f217237e4fb0 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Thu Feb 11 13:23:25 2016 -0700 |
committer | Simon Glass <sjg@chromium.org> | Mon Mar 14 15:34:50 2016 -0600 |
tree | d0dfd81b292e93e73227e015246382ac4a6f689b | |
parent | 268e9d82ee801f946c806696adf24f481dd9f57f [diff] |
dm: core: Add uclass_first_device_err() to return a valid device A common pattern is to call uclass_first_device() and then check if it actually returns a device. Add a new function which does this, returning an error if there are no devices in that uclass. Signed-off-by: Simon Glass <sjg@chromium.org>