diff options
author | Maxime Ripard <[email protected]> | 2022-08-16 13:25:25 +0200 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2022-09-15 09:32:06 -0700 |
commit | 22fb0e284fbc3c1b85d24c5a1df8ea3ac82ab1d1 (patch) | |
tree | 2d98056f1d0903bcbe8123ae423602bb7b06d317 | |
parent | 1234a2c40b8cf16041fb9acd730160e6c5b4ba13 (diff) |
clk: Constify clk_has_parent()
clk_has_parent() doesn't modify the clocks being passed, so let's make
it const.
Suggested-by: Stephen Boyd <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Linux Kernel Functional Testing <[email protected]>
Tested-by: Naresh Kamboju <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
-rw-r--r-- | drivers/clk/clk.c | 2 | ||||
-rw-r--r-- | include/linux/clk.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8e4a8b9aa320..3b68a9b8234a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2593,7 +2593,7 @@ void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent) * * Returns true if @parent is a possible parent for @clk, false otherwise. */ -bool clk_has_parent(struct clk *clk, struct clk *parent) +bool clk_has_parent(const struct clk *clk, const struct clk *parent) { /* NULL clocks should be nops, so return success if either is NULL. */ if (!clk || !parent) diff --git a/include/linux/clk.h b/include/linux/clk.h index c13061cabdfc..1ef013324237 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -799,7 +799,7 @@ int clk_set_rate_exclusive(struct clk *clk, unsigned long rate); * * Returns true if @parent is a possible parent for @clk, false otherwise. */ -bool clk_has_parent(struct clk *clk, struct clk *parent); +bool clk_has_parent(const struct clk *clk, const struct clk *parent); /** * clk_set_rate_range - set a rate range for a clock source |