diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2009-05-28 12:50:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:14:15 -0400 |
commit | 511da457340d3b30336f7a6731bad9bbe3ffaf08 (patch) | |
tree | 6021cc70663ec8e8c25f540a1b836ecc6fc1cae1 | |
parent | a5beb7b32364a236e833631c3ee5c910cbbfa5bb (diff) |
V4L/DVB (11877): lgdt3305: fix 64bit division in function lgdt3305_set_if
Signed-off-by: Michael Krufky <kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/frontends/lgdt3305.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/media/dvb/frontends/lgdt3305.c b/drivers/media/dvb/frontends/lgdt3305.c index d92d0557a80b..fde8c59700fb 100644 --- a/drivers/media/dvb/frontends/lgdt3305.c +++ b/drivers/media/dvb/frontends/lgdt3305.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <asm/div64.h> | ||
22 | #include <linux/dvb/frontend.h> | 23 | #include <linux/dvb/frontend.h> |
23 | #include "dvb_math.h" | 24 | #include "dvb_math.h" |
24 | #include "lgdt3305.h" | 25 | #include "lgdt3305.h" |
@@ -496,27 +497,15 @@ static int lgdt3305_set_if(struct lgdt3305_state *state, | |||
496 | 497 | ||
497 | nco = if_freq_khz / 10; | 498 | nco = if_freq_khz / 10; |
498 | 499 | ||
499 | #define LGDT3305_64BIT_DIVISION_ENABLED 0 | ||
500 | /* FIXME: 64bit division disabled to avoid linking error: | ||
501 | * WARNING: "__udivdi3" [lgdt3305.ko] undefined! | ||
502 | */ | ||
503 | switch (param->u.vsb.modulation) { | 500 | switch (param->u.vsb.modulation) { |
504 | case VSB_8: | 501 | case VSB_8: |
505 | #if LGDT3305_64BIT_DIVISION_ENABLED | ||
506 | nco <<= 24; | 502 | nco <<= 24; |
507 | nco /= 625; | 503 | do_div(nco, 625); |
508 | #else | ||
509 | nco *= ((1 << 24) / 625); | ||
510 | #endif | ||
511 | break; | 504 | break; |
512 | case QAM_64: | 505 | case QAM_64: |
513 | case QAM_256: | 506 | case QAM_256: |
514 | #if LGDT3305_64BIT_DIVISION_ENABLED | ||
515 | nco <<= 28; | 507 | nco <<= 28; |
516 | nco /= 625; | 508 | do_div(nco, 625); |
517 | #else | ||
518 | nco *= ((1 << 28) / 625); | ||
519 | #endif | ||
520 | break; | 509 | break; |
521 | default: | 510 | default: |
522 | return -EINVAL; | 511 | return -EINVAL; |