mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
clk: clocking-wizard: fix clock difference detection
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
fd0e3e4ede
commit
006ba909c2
|
|
@ -414,7 +414,7 @@ static int clk_wzrd_get_divisors(struct clk_hw *hw, unsigned long rate,
|
|||
if (o < omin || o > omax)
|
||||
continue;
|
||||
freq = DIV_ROUND_CLOSEST_ULL(vco_freq, o);
|
||||
diff = freq - rate;
|
||||
diff = abs(freq - rate);
|
||||
if (diff < best_diff) {
|
||||
best_diff = diff;
|
||||
divider->m = m >> 3;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user