Skip to content
Commit e44d7e73 authored by Michal Suchanek's avatar Michal Suchanek Committed by Simon Glass
Browse files

dm: core: Switch uclass_*_device_err to use uclass_*_device_check



The _err variant iterators use the simple iterators without suffix as
basis.

However, there is no user that uclass_next_device_err for iteration,
many users of uclass_first_device_err use it to get the first and
(assumed) only device of an uclass, and a couple that use
uclass_next_device_err to get the device following a known device in the
uclass list.

While there are some truly singleton device classes in which more than
one device cannot exist these are quite rare, and most classes can have
multiple devices even if it is not the case on the SoC's EVB.

In a later patch the simple iterators will be updated to not stop on
error and return next device instead. With this in many cases the code
that expects the first device or an error if it fails to probe may get
the next device instead. Use the _check iterators as the basis of _err
iterators to preserve the old behavior.

Signed-off-by: default avatarMichal Suchanek <msuchanek@suse.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 801f7119
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment