From: Arnd Bergmann Date: Fri, 28 Jul 2017 13:23:12 +0000 (+0200) Subject: staging: pi433: use div_u64 for 64-bit division X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99859541a92de570eb624c2488754d2406375c74;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: pi433: use div_u64 for 64-bit division I ran into this link error on an ARM OABI build: drivers/staging/pi433/rf69.o: In function `rf69_set_frequency': rf69.c:(.text+0xc9c): undefined reference to `__udivdi3' No idea why I didn't see it with the default EABI configurations, but the right solution here seems to be to use div_u64() to get the external division implementation. Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 1b094c38f401..f83523e3395d 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -238,7 +238,7 @@ int rf69_set_frequency(struct spi_device *spi, u32 frequency) do_div(f_step, 524288); // 524288 = 2^19 // check input value - f_max = f_step * 8388608 / factor; + f_max = div_u64(f_step * 8388608, factor); if (frequency > f_max) { dev_dbg(&spi->dev, "setFrequency: illegal input param");