[PATCH v2 1/2] clk: Allow clk_get_by_name() with NULL name
Simon Glass
sjg at chromium.org
Mon Jan 23 19:42:22 CET 2023
On Sat, 21 Jan 2023 at 17:02, Samuel Holland <samuel at sholland.org> wrote:
>
> This allows devm_clock_get(dev, NULL) to work and get the first clock,
> 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/clk/clk-uclass.c | 12 +++++++-----
> include/clk.h | 4 ++--
> test/dm/clk.c | 5 +++++
> 3 files changed, 14 insertions(+), 7 deletions(-)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list