mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 23:23:30 +08:00
clk: change return type of clk_get_parent_rate from long long to ulong
All functions getting and setting clock rate use ulong for rate, only
clk_get_parent_rate is an exception. Change the return value to match
other clock rate funcrions.
Most users directly assign the rate to unsigned long anyway, and the few
users that use u64 (not s64) multiply the rate so they may need the
extra bits for the result in their use case.
Fixes: 4aa78300a0
("dm: clk: Define clk_get_parent_rate() for clk operations")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20220928103757.11870-1-msuchanek@suse.de
This commit is contained in:
parent
d3ccdc0fce
commit
a1265cd580
@ -505,7 +505,7 @@ struct clk *clk_get_parent(struct clk *clk)
|
||||
return pclk;
|
||||
}
|
||||
|
||||
long long clk_get_parent_rate(struct clk *clk)
|
||||
ulong clk_get_parent_rate(struct clk *clk)
|
||||
{
|
||||
const struct clk_ops *ops;
|
||||
struct clk *pclk;
|
||||
|
@ -444,7 +444,7 @@ struct clk *clk_get_parent(struct clk *clk);
|
||||
*
|
||||
* Return: clock rate in Hz, or -ve error code.
|
||||
*/
|
||||
long long clk_get_parent_rate(struct clk *clk);
|
||||
ulong clk_get_parent_rate(struct clk *clk);
|
||||
|
||||
/**
|
||||
* clk_round_rate() - Adjust a rate to the exact rate a clock can provide
|
||||
@ -577,7 +577,7 @@ static inline struct clk *clk_get_parent(struct clk *clk)
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline long long clk_get_parent_rate(struct clk *clk)
|
||||
static inline ulong clk_get_parent_rate(struct clk *clk)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user