diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-23 21:38:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-26 05:47:42 -0400 |
commit | 2ea12442e3e5df6107ba4f948c7e6f7c99b3b373 (patch) | |
tree | 25a863fac446b99ca21d110988afe3b4a4431fb2 /drivers/media | |
parent | 46cebe017afd03614b17c70ed5ed2734ec3796f7 (diff) |
[media] tc90522: fix compilation on 32 bits
drivers/built-in.o: In function `tc90522t_get_frontend':
>> tc90522.c:(.text+0x260b64c): undefined reference to `__divdi3'
>> tc90522.c:(.text+0x260b685): undefined reference to `__divdi3'
>> tc90522.c:(.text+0x260b6bb): undefined reference to `__divdi3'
>> tc90522.c:(.text+0x260b713): undefined reference to `__divdi3'
drivers/built-in.o:tc90522.c:(.text+0x260bb64): more undefined references to `__divdi3' follow
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-frontends/tc90522.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index cdd9808c322c..d9905fb52f84 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/math64.h> | ||
31 | #include <linux/dvb/frontend.h> | 32 | #include <linux/dvb/frontend.h> |
32 | #include "dvb_math.h" | 33 | #include "dvb_math.h" |
33 | #include "tc90522.h" | 34 | #include "tc90522.h" |
@@ -275,7 +276,7 @@ static int tc90522s_get_frontend(struct dvb_frontend *fe) | |||
275 | /* cn = cnr << 3 */ | 276 | /* cn = cnr << 3 */ |
276 | p = int_sqrt(cndat << 16); | 277 | p = int_sqrt(cndat << 16); |
277 | p4 = cndat * cndat; | 278 | p4 = cndat * cndat; |
278 | cn = (-16346LL * p4 * p / 10) >> 35; | 279 | cn = div64_s64(-16346LL * p4 * p, 10) >> 35; |
279 | cn += (14341LL * p4) >> 21; | 280 | cn += (14341LL * p4) >> 21; |
280 | cn -= (50259LL * cndat * p) >> 23; | 281 | cn -= (50259LL * cndat * p) >> 23; |
281 | cn += (88977LL * cndat) >> 9; | 282 | cn += (88977LL * cndat) >> 9; |
@@ -434,13 +435,13 @@ static int tc90522t_get_frontend(struct dvb_frontend *fe) | |||
434 | p *= 10; | 435 | p *= 10; |
435 | 436 | ||
436 | cn = 24772; | 437 | cn = 24772; |
437 | cn += ((43827LL * p) / 10) >> 24; | 438 | cn += div64_s64(43827LL * p, 10) >> 24; |
438 | tmp = p >> 8; | 439 | tmp = p >> 8; |
439 | cn += ((3184LL * tmp * tmp) / 10) >> 32; | 440 | cn += div64_s64(3184LL * tmp * tmp, 10) >> 32; |
440 | tmp = p >> 13; | 441 | tmp = p >> 13; |
441 | cn -= ((128LL * tmp * tmp * tmp) / 10) >> 33; | 442 | cn -= div64_s64(128LL * tmp * tmp * tmp, 10) >> 33; |
442 | tmp = p >> 18; | 443 | tmp = p >> 18; |
443 | cn += ((192LL * tmp * tmp * tmp * tmp) / 1000) >> 24; | 444 | cn += div64_s64(192LL * tmp * tmp * tmp * tmp, 1000) >> 24; |
444 | 445 | ||
445 | stats->stat[0].svalue = cn >> 3; | 446 | stats->stat[0].svalue = cn >> 3; |
446 | stats->stat[0].scale = FE_SCALE_DECIBEL; | 447 | stats->stat[0].scale = FE_SCALE_DECIBEL; |