Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1a3cd184 authored by James Hogan's avatar James Hogan Committed by Mike Turquette
Browse files

clk-divider: fix macros



The macro is_power_of_two() in clk-divider.c was defined as !(i & ~i)
which is always true.  Instead use is_power_of_2() from log2.h.

Also add brackets around the macro arguments in div_mask to avoid any
future operator precedence problems.

Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: use log2.h per Joe Perches; update changelog]
parent eb8b8f2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment