mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
tegra/clk-divider: fix wrong do_div() usage
do_div() is meant to be used with an unsigned dividend. Signed-off-by: Nicolas Pitre <nico@linaro.org>
This commit is contained in:
parent
4471f9a4db
commit
3ed9c82437
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@
|
|||
static int get_div(struct tegra_clk_frac_div *divider, unsigned long rate,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
s64 divider_ux1 = parent_rate;
|
||||
u64 divider_ux1 = parent_rate;
|
||||
u8 flags = divider->flags;
|
||||
int mul;
|
||||
|
||||
|
@ -54,7 +54,7 @@ static int get_div(struct tegra_clk_frac_div *divider, unsigned long rate,
|
|||
|
||||
divider_ux1 -= mul;
|
||||
|
||||
if (divider_ux1 < 0)
|
||||
if ((s64)divider_ux1 < 0)
|
||||
return 0;
|
||||
|
||||
if (divider_ux1 > get_max_div(divider))
|
||||
|
|
Loading…
Add table
Reference in a new issue