mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
clk: Remove clock ID check in .get_rate() of clk_fixed_*
This check requires the struct clk passed to .get_rate() to be always cleared out as any clock with valid ID causes -EINVAL return value. The return code of fixed clocks shall always be returned. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
committed by
Stefano Babic
parent
a9092710c5
commit
ec8f1c02dd
@@ -24,9 +24,6 @@ static ulong clk_fixed_factor_get_rate(struct clk *clk)
|
|||||||
uint64_t rate;
|
uint64_t rate;
|
||||||
struct clk_fixed_factor *ff = to_clk_fixed_factor(clk->dev);
|
struct clk_fixed_factor *ff = to_clk_fixed_factor(clk->dev);
|
||||||
|
|
||||||
if (clk->id != 0)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
rate = clk_get_rate(&ff->parent);
|
rate = clk_get_rate(&ff->parent);
|
||||||
if (IS_ERR_VALUE(rate))
|
if (IS_ERR_VALUE(rate))
|
||||||
return rate;
|
return rate;
|
||||||
|
@@ -15,9 +15,6 @@ struct clk_fixed_rate {
|
|||||||
|
|
||||||
static ulong clk_fixed_rate_get_rate(struct clk *clk)
|
static ulong clk_fixed_rate_get_rate(struct clk *clk)
|
||||||
{
|
{
|
||||||
if (clk->id != 0)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return to_clk_fixed_rate(clk->dev)->fixed_rate;
|
return to_clk_fixed_rate(clk->dev)->fixed_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user