Commit 2b280540 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Andi Shyti
Browse files

i2c: mlxbf: avoid 64-bit division



The 64-bit division in mlxbf_i2c_get_ticks() causes link failures
when compile-testing on 32-bit machines:

ERROR: modpost: "__udivdi3" [drivers/i2c/busses/i2c-mlxbf.ko] undefined!

Change this to a div_u64(), which should replace the constant division
with a a multiply/shift combination in the mlxbf_i2c_get_ticks().

The frequency calculation functions require a slow library call but
should be used much rarer.

Fixes: 05385900 ("i2c: mlxbf: Allow build with COMPILE_TEST")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250520152600.1975628-1-arnd@kernel.org


Signed-off-by: default avatarAndi Shyti <andi@smida.it>
parent 3b7d8d15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment