[PATCH v2 2/2] reset: Allow reset_get_by_name() with NULL name

Simon Glass sjg at chromium.org
Mon Jan 23 19:49:54 CET 2023


On Sat, 21 Jan 2023 at 17:02, Samuel Holland <samuel at sholland.org> wrote:
>
> This allows devm_reset_control_get(dev, NULL) to work and get the first
> reset control, which is common in code ported from Linux.
>
> Signed-off-by: Samuel Holland <samuel at sholland.org>
> ---
>
> Changes in v2:
>  - Move index error check inside if statement
>  - Update function comment
>  - Add unit test
>
>  drivers/reset/reset-uclass.c | 12 +++++++-----
>  include/reset.h              |  3 ++-
>  test/dm/reset.c              |  3 +--
>  3 files changed, 10 insertions(+), 8 deletions(-)

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


More information about the U-Boot mailing list