diff options
| author | Samuel Holland <[email protected]> | 2023-01-21 18:02:51 -0600 |
|---|---|---|
| committer | Sean Anderson <[email protected]> | 2023-02-12 13:44:20 -0500 |
| commit | 2050f824e1367cb227d8e13a91c98577987fe413 (patch) | |
| tree | bb06ae6e463c3df7b8aed1b2aac2eaa4e4e0d59f /include | |
| parent | c40251c120fac5a85fb445b6b2c7db5d18792e2a (diff) | |
clk: Allow clk_get_by_name() with NULL name
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 <[email protected]>
Reviewed-by: Sean Anderson <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
| -rw-r--r-- | include/clk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clk.h b/include/clk.h index 138766bd49f..d91285235f7 100644 --- a/include/clk.h +++ b/include/clk.h @@ -167,7 +167,7 @@ int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk); * clk_get_by_name() - Get/request a clock by name. * @dev: The client device. * @name: The name of the clock to request, within the client's list of - * clocks. + * clocks, or NULL to request the first clock in the list. * @clk: A pointer to a clock struct to initialize. * * This looks up and requests a clock. The name is relative to the client @@ -184,7 +184,7 @@ int clk_get_by_name(struct udevice *dev, const char *name, struct clk *clk); * clk_get_by_name_nodev - Get/request a clock by name without a device. * @node: The client ofnode. * @name: The name of the clock to request, within the client's list of - * clocks. + * clocks, or NULL to request the first clock in the list. * @clk: A pointer to a clock struct to initialize. * * Return: 0 if OK, or a negative error code. |
