Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ts2020: fix compilation on i386

drivers/built-in.o: In function `ts2020_read_signal_strength':
ts2020.c:(.text+0x298ff94): undefined reference to `__divdi3'
ts2020.c:(.text+0x298ffd4): undefined reference to `__divdi3'
ts2020.c:(.text+0x298fffd): undefined reference to `__divdi3'
Makefile:921: recipe for target 'vmlinux' failed

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

+4 -3
+4 -3
drivers/media/dvb-frontends/ts2020.c
··· 22 22 #include "dvb_frontend.h" 23 23 #include "ts2020.h" 24 24 #include <linux/regmap.h> 25 + #include <linux/math64.h> 25 26 26 27 #define TS2020_XTAL_FREQ 27000 /* in kHz */ 27 28 #define FREQ_OFFSET_LOW_SYM_RATE 3000 ··· 484 483 strength = 0; 485 484 else if (gain < -65000) 486 485 /* 0% - 60%: weak signal */ 487 - strength = 0 + (85000 + gain) * 3 / 1000; 486 + strength = 0 + div64_s64((85000 + gain) * 3, 1000); 488 487 else if (gain < -45000) 489 488 /* 60% - 90%: normal signal */ 490 - strength = 60 + (65000 + gain) * 3 / 2000; 489 + strength = 60 + div64_s64((65000 + gain) * 3, 2000); 491 490 else 492 491 /* 90% - 99%: strong signal */ 493 - strength = 90 + (45000 + gain) / 5000; 492 + strength = 90 + div64_s64((45000 + gain), 5000); 494 493 495 494 *_signal_strength = strength * 65535 / 100; 496 495 return 0;