Commit 22fb0e28 authored by Maxime Ripard's avatar Maxime Ripard Committed by Stephen Boyd

clk: Constify clk_has_parent()

clk_has_parent() doesn't modify the clocks being passed, so let's make
it const.
Suggested-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-21-maxime@cerno.techTested-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Tested-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 1234a2c4
...@@ -2593,7 +2593,7 @@ void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent) ...@@ -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. * 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. */ /* NULL clocks should be nops, so return success if either is NULL. */
if (!clk || !parent) if (!clk || !parent)
......
...@@ -799,7 +799,7 @@ int clk_set_rate_exclusive(struct clk *clk, unsigned long rate); ...@@ -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. * 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 * clk_set_rate_range - set a rate range for a clock source
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment